Andrew Libby on 24 Jan 2006 14:34:00 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] /usr/local vs. /opt

Greetings Art,

When I first began learning Unix/ Linux I too was told that /usr/local
is the place
for my local customizations.  I'd put scripts out there, build my local
from /usr/local/src, and have it's --prefix=/usr/local.  

Along the way I've done some work as a Solaris admin where optional
packages are installed in /opt.   My approach was to link  /usr/local
and /opt together on my systems.
Indeed, even in Linux many packages now install in /opt.  I believe
vmware may be
this way (or is that only on gentoo due to the approach of ebuild authors)?

Someone then pointed out to me that /usr/local and /usr/share were
intended to be
local and nfs exported filesystems.  I don't know how true this is, but
based on
the names, that makes sense.

I recall a standard on this that I once read.  Searching yielded this page  The FHS talks about both /opt and /usr/local.

3.13. /opt : Add-on application software packages
3.13.1. Purpose
/opt is reserved for the installation of add-on application software
A package to be installed in /opt must locate its static files in a
separate /opt/<package> or
/opt/<provider> directory tree, where <package> is a name that describes
the software package and
<provider> is the provider's LANANA registered name.

4.8.2. /usr/local : Local hierarchy Purpose
The /usr/local hierarchy is for use by the system administrator when
installing software locally. It needs to
be safe from being overwritten when the system software is updated. It
may be used for programs and data that
are shareable amongst a group of hosts, but not found in /usr.
Locally installed software must be placed within /usr/local rather than
/usr unless it is being installed to
replace or upgrade software in /usr. 7

It's almost worded like ISV packages are intended to be installed in
OPT, while build from source packages
are intended for /usr/local.  I may be reading into this too much.  
Neither of these make reference to sharing
out with something like NFS.  The sections for /usr/share seem to.

IMO, coherent and consistent file system layout and management is a key
to good systems administration.
Perhaps this could be a talk someone gives at some point.  It'd be
interesting to see a survey of distributions
and their support of this (or competing) standard.

Other folks have thoughts?


Art Alexion wrote:

>I have been led to believe that the /usr/local branch is where packages
>that aren't part of a distro should be installed.  I put custom scripts
>in /usr/local/bin for that reason.
>But I have also been told that's the purpose of the /opt branch.
>What is the difference between these two and when should one use which?
>Philadelphia Linux Users Group         --
>Announcements -
>General Discussion  --

Andrew Libby                         
Motorcycle Enthusiasm, Fishtown Style

1999 SV650
1999 Laverda 750S
1996 BMWR1100RS
1981 Moto Guzzi CX100 (in Lemans I clothing)

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --