Where'd they go ?

Benjamin Scott dragonhawk at iname.com
Tue Nov 29 01:55:01 EST 2005


On Nov 28 at 10:07pm, Paul Lussier wrote:
>> ... everything "under package management" ... is also installed under 
>> /usr/ ...  Stuff built from source, or binaries installed via file copy or 
>> some vendor-specific install tool, belong in /usr/local/ and/or /opt/.
>
> I tend to agree with this view, except, "there is no /opt, just
> /usr/local" :)

   Since we're all putting forward our own pet favorites: I use both, but with 
a methodology.

   I use "/opt/foo" when "foo" is something I want to keep self-contained.  I 
generally do that for large, complicated things, like Apache, Samba, Squid, 
etc.  Sometimes I add revision control.  I do it for binary crap that wants 
to install that way.  I'll create </opt/foo-x.y.z> directories, and symlink 
</opt/foo> to the current version.  The major thing I'm after is the ability 
to "rm -rf /opt/foo" to remove something.  Most often, this is because the 
thing I'm putting in /opt/ is in some way "weird".

   For stuff that I want to be "integrated" into the whole system, as if it 
was meant to be there from the start, I put that in </usr/local>.

   I also usually make /opt/ a symlink into /usr/local/opt/ anyway.  :)

   When I was brand new to Nix, I didn't know about "/opt/".  I actually 
created a directory called.... I think it was "/usr/local/pkgs/"... for the 
same purpose.  Shortly thereafter, I found out about "/opt/" and switched to 
that to be consistent with the rest of the world.

>> The other school of thought is that everything not provided by the
>> distro goes in /usr/local/ and/or /opt/, regardless of whether or not
>> it is under package management.  The benefit here is that you can tell
>> at a glance what was "layered" on top of the base system.
>
> I believe this is how *BSD does it.  At least OpenBSD does.  Though it's a 
> little more fine-grained than that.  Anything installed "at install time" 
> is in /usr, anything installed after that goes in /usr/local.  Though, that 
> may be a result of the choice of packages available fat install time is 
> incredibly small, and everything else is from the ports system, I'm not 
> entirely clear on that.

   My understanding (which is basically based on a couple of FAQ's, so take 
this with a grain of salt) is that the "core" or "base" system is installed 
in </> and </usr/>.  That's all the traditional old-school Nix stuff, dating 
back to when BSD actually was the Berkley Software Distribution.  The "ports" 
collection is all the stuff (e.g., Samba) that's been ported to BSD, 
pre-configured.  You're still building from source, in the traditional Nix 
way, so of course it goes in /usr/local/.

On Nov 28 at 10:02pm, Paul Lussier wrote:
>> I know Red Hat/Fedora/whoever likes to put everything in /usr/bin/ these 
>> days, regardless of what environment it runs under.
>
> Well, it's good to know they do *something* right ;)

   I'm sure it was an oversight.  ;-)

-- 
Ben <dragonhawk at iname.com>



More information about the gnhlug-discuss mailing list