Occasionally I install applications manually, rather than using apt or another package manager.
What location (/usr/, /usr/local/, /opt/, /home/, etc.) is suggested by "best practices" for the installation of user applications?
|
Occasionally I install applications manually, rather than using What location ( |
||||
|
That depends, really. If the application has a makefile, (for python apps) uses distutils (has a If you just need to extract a tarball and run directly (e.g. Thunderbird, Firefox) then put it into Why? From what I understand, |
|||||||||||||
|
|
The Linux Filesystem Hierarchy Standard indicates From http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html:
|
|||||
|
|
It's good to remember that As such, I tend to figure that any distribution has the rights to stomp all over over contents of Meanwhile, applications and other things go in Some people feel comfortable putting stuff in All that said, I let the distribution package manager do things its way first, and then do the above when hand rolling stuff. |
|||||||||||||||||||||
|
|
Use "checkinstall" to convert your alien package to a deb so that it is uninstallable using the package manager. Do note that config files will often not be handled as config files (perhaps ignored, or perhaps treated as part of the app), and that pre- and post-install scripts sometimes get bungled, though it will usually warn you when it thinks the deb will have a bad pre- or post-install script. |
|||
|
|
|
Install unstable programs like firefox devel in /home/user/opt/ makes it a lot easier to remove, and no confusion for other users as to what version they should use... So if it is not a program for global use, install it in a subfolder in your home directory. Never install programs in /usr/, it is likely to cause chaos, things installed in /usr/ is meant to be for distribution packages only. /usr/local/ is for packages locally compiled. And the srtucture works in exactly the same way! files in /usr/local/ will be prioritized over files in /usr/ /opt/ should be used for installation of pre-compiled (binary) packages (Thunderbird, Eclipse, Netbeans, IBM NetSphere, etc) and the like. But if they are only for a single user they should be put in your home directory. If you want to be able to run a program installed in a "weird" location (like /home/user/opt/firefox/) without typing the whole path you need to add it to your $PATH variable, you can do this be adding a line like this in your /home/user/.profile
The folder name should be the one where the executable file you need to run is located. |
|||
|
|
|
I usually have a folder named "Programs" in my home where I install those programs, strange enough (or not) they are all java stuff right now. It has one great advantage for me, when I reinstall or change computers they get moved with the rest of my home. It has a clear disadvantage, those apps are only available to my user. |
|||||
|
/optand/usr/local: unix.stackexchange.com/q/11544/11917 – blong Oct 26 '15 at 20:13