Friday 1 December 2017

linux - Where should I install binaries that don't come as .deb?


I'm going to run EC2 instance for dev purposes on AWS. Most likely Ubuntu (once had it on my laptop). I am Java developer, so I need JDK, Tomcat, Maven, Git and MongoDB on the server. But software in repos is too old (MongoDB in ubuntu repos is 2.0.x version, when I need 2.2.x). So, I'm going to download zipped binaries and use them.


Where do I install software which is not packed with .deb? Should I install it to /home/user/, or maybe to /opt as Chrome does?



Answer



Sometimes I make a ~/Installed directory. According to Geek Stuff, /opt is for software vendor add-ons. /usr/local appears to be the "most proper" directory to place manually installed source code, binaries and so on.


Update: TLDP says



The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs. The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...