The Computer Oracle

Where should I install my app on Linux?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Romantic Lands Beckon

--

Chapters
00:00 Where Should I Install My App On Linux?
01:46 Answer 1 Score 2
02:16 Accepted Answer Score 15
02:57 Thank you

--

Full question
https://superuser.com/questions/728659/w...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #centos

#avk47



ACCEPTED ANSWER

Score 15


This is a question with no right answer and an intriguing bit of Unix history.

The rule we followed at my prior employer was that non-out-of-the-box software was installed in /opt/PackageName-VersionNumber and there was a symbolic link from /opt/PackageName-VersionNumber to /opt/PackageName.

Configs go in /opt/PackageName/etc
Logs go in /opt/PackageName/logs
Binaries go in /opt/PackageName/bin
Data goes in /opt/PackageName/data

For apps that were to be distributed outside of our shop we wrote them to be relocatable by the package manager. This was a rare occurrence, and not "fun".




ANSWER 2

Score 2


As far as I'm aware native linux applications are written to have their binaries in [/usr]/bin, logs in /var, config in /etc, and so on. Non native applications or combinations of packages (such as lampp/xampp for example) that are meant to be used systemwide, on the other hand are by default installed in /opt, with the configuration usually also residing in that folder. If the software is meant to run per user a folder inside their home directory is customary.