/usr/local vs. /opt

Michael A. Peters mpeters at mac.com
Sat Sep 17 08:30:47 UTC 2005


On Fri, 2005-09-16 at 08:12 -0400, Steve Snyder wrote:
> Is there a standard or rule-of-thumb regarding location of non-distribution 
> software packages?  I've read the HFS spec, but I'm still not clear on this.
> 
> Some packages, both RPM-based and tarballs, want to install in /opt and others 
> in /usr/local.  I don't perceive a pattern to where a given type of 
> installation prefers to install its files.
> 
> Given a choice in locations, where should I opt to install RPM packages, and 
> where should non-RPM software go?

Stuff I compile from source I generally put into /usr/local

Actually, I don't anymore - I package it in rpm ;)

Shell scripts I write, I generally put in ~/bin but sometimes
in /usr/local/{bin,sbin}

Stuff from a vendor that is packaged in rpm (acroread etc.), I let the
package put it where it wants it.

Stuff from a vendor that is NOT packaged, I put in either /opt/package
or /opt/vendor/package
I then make symlinks to /usr/local/bin (or put a wrapper script
in /usr/local/bin )

I also use /opt for installing stuff that would otherwise conflict with
distro packages.
For example, I need the CVS version of gnuplot for a few graphs.
I created an rpm that installs it into /opt/gnuplot

I used rpm because it allows me to easily do a newer CVS co and make a
new package to update an older CVS co, and I put it into /opt/gnuplot so
that it would not conflict with the system gnuplot. I don't want it in
my path, I want to call it explicitly full path when I want to use the
cvs version (which has some bugs, the x11 terminal type has a buffer
overflow and exits, for example - but the pslatex terminal, what I need,
works fine).

-=-
Whatever works for how you do things is what you should do :)




More information about the users mailing list