morgan on 24 Jan 2006 15:07:42 -0000


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

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


Hello everyone. I have been following this thread with some interest. I have done a lot of work with Solaris and some with Linux and I _believe_ I have a definitive definition of /opt vs. /usr/local as well as a compromise that works well at least in Solaris:

/opt is System V (SysV) for option packages while /usr/local is Berkeley (BSD).

The SysV way is 4 character vendor name in upper case followed by lower case package name, thus SUNWmsgsr, SUNWwbsvr, SUNWuwc.

The Berkeley (BSD) way is build it from source and install it in ${PATH}/lib ${PATH}/bin ${PATH}/man ${PATH}/etc.

Now, Linux has morphed to contain SysV-isms as well as BSD-isms depending on your distro. Solaris and other SysV variants tend to be more strict if you ask the vendor but the reality is that many of us use BSD packages in Solaris.

So.. SysV likes /opt/VNDRpckname while BSD likes to dump everything in /usr/local/lib /usr/local/bin /usr/local/man, etc.

In Solaris I say mkdir /opt/local and ln -s /opt/local /usr/local/opt. This allows you to have all your optional package on one partition and appease both SysV and BSD without intermixing SUNWmsgsr and SUNWwbsvr with lib and man.

I do less Linux administration but my general feeling is that Linux uses /opt less. I might create /usr/local/opt and ln -s /usr/local/opt /opt. But Linux has fewer restrictions on number of partitions so it might make sense to mount the 2 separately. Solaris also has less general traction than Open Source/Linux so you may find you use /opt less in Linux and space usage isn't as much of an issue.

Either way, you probably want to come up with a consistent scheme to accomodate both as packages seem to prefer one or the other.

-morgan


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         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug