4 ms·
"Today’s UNIX and UNIX-like systems (such as Mac OS X, Linux, FreeBSD, Solaris, etc.) allow you to create a special place in the filesystem where you can compil
by briansmith 18y ago
"Today’s UNIX and UNIX-like systems (such as Mac OS X, Linux, FreeBSD, Solaris, etc.) allow you to create a special place in the filesystem where you can compile and install your own software independent of and without affecting the rest of the system."
Yes, that is called "/opt", not /usr/local. /usr/local is for local extensions to the operating system itself, not applications.
- SwellJoe 18y agoDepends on where you live, OS-wise. But, yes, /opt has mostly been settled on in the past few years for most third party applications...and it's a place where randomly named paths are not considered a faux pas. Such as, "/opt/ruby-1.9.1" and "/opt/perl5.005_04" and such, and they don't have to live in normal /usr/local/usr, /usr/local/etc, and so on, paths, which is the norm in /usr/local. One can argue all day about what makes something a "local extension to the operating system itself". Is Python a local extension to the OS itself? What if a large number of system tools use Python (as is the case on Red Hat based systems, Gentoo, and Ubuntu more with every release)? But, because the /usr/local binary directories tend to already be in the path (and before the / equivalents) installing random stuff in there is probably a horrible idea. But, folks really ought not be encouraging this sort of thing, in general. Unless you really know you need some specific version of software, and why, you should probably be using the OS-provided packages, which are better tested (so they're generally more reliable), better supported (so you can complain to someone when you run into a problem), and more widely used (so you can find people talking about your specific version when you hit up Google for advice). Anyway, I agree. /opt is the socially acceptable place to put random crap on a system.
- ankhmoop 18y agoThe statement seems accurate enough. FHS is not directly followed by any BSDs, so here is Mac OS X's hier(7) man page: /usr/local/ executables, libraries, etc. not included by the basic operating system '/opt' is not documented by hier(7) on FreeBSD, Mac OS X, or OpenBSD.
- sant0sk1 18y ago+1 for /opt The only way I feel comfortable compiling software into my system because I KNOW I can delete it by just removing the directory created inside /opt. The only tricky part is making sure your compiled binaries in /opt/*/bin are in your executable path.
- alecco 18y agoCreating yet another complication for jails and chroot.
- sketerpot 18y agoThis is the way I do it. Will this make problems? /usr for stuff installed by apt-get. /usr/local for stuff I install with "./configure && make && make install" or similar commands. /opt for self-contained application bundles.
- w1ntermute 18y agoThat's not what Gentoo does. It uses /opt for any closed-source software, while /usr/local is left untouched. I believe Ubuntu doesn't use /usr/local either. Wikipedia (http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) says it's for "Tertiary hierarchy for local data, specific to this host."