As a recovering, long-time Windows user, I've been trying to clarify my understanding of the "proper" place to put things in Linux (or UNIX too I guess but I rarely work in a non-OS X UNIX and Mac OS X is hardly "proper"). I'd prefer to keep the question fairly distribution-independent but if the correct answer depends upon a particular flavor then that is fine. My goal is to be able to have others work within a system that I've setup and be able to logically follow the organization.
1. When it comes to the roll of a sysadmin (as opposed to a user role), where do people generally agree is best for installing server binaries like web servers, database, etc.? From what I've gleaned over time it appears that both of these are correct:
/opt/<package>/usr/local/bin/<package>
The Filesystem Hierarchy Standard doesn't seem to clearly differentiate. Are there advantages disadvantages of one over the other, or is this just preference?
2. Also I've commonly seen this type of thing:
/usr/local/bin/foo-bar-3.2.1-baz/usr/local/bar -> /usr/local/bin/foo-bar-3.2.1-baz
Where the version-specific package is the actual location and then a symbolic link is added to make typing / upgrading easier. Is this pretty universal?
3. And then the next logical question is where do the data for their binaries go? This seems to be common:
/var/lib/<package>
Is there a better location?