Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

/etc?

/srv?

/home?

Apps in these languages shouldn't be under document root (which, in my opinion, goes under /srv/www). But, otherwise, I can't think of a location/scheme that's best practice to store them.

Ideas?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Somewhere under /srv. Unless their package installs them somewhere else, in which case the configuration should still be under /srv.

share|improve this answer
    
But /srv/www should be document root for the web server, no? And /srv/ should be organized by protocol, ideally, right? (/srv/www, /srv/ftp, etc). –  eastydude5 Jun 6 '11 at 20:21
    
There is no fixed organization for /srv. Even the FHS admits this. –  Ignacio Vazquez-Abrams Jun 6 '11 at 20:22
    
Thanks again, Ignacio! –  eastydude5 Jun 6 '11 at 20:34
    
/srv is for data. /opt is for software packages. –  Rik Schneider Jun 6 '11 at 20:57
1  
Honestly... that's 100% a matter of preference. Each platform has their own recommended best practices. Some suggest /var/www/{engine}/{application} others suggest /www... and even others would suggest creating user accounts for each customer (or application) and placing the application inside the users' home directory... i.e. /home/customer/application It's really mostly a matter of picking a standard across your environment and sticking with it. –  TheCompWiz Jun 6 '11 at 21:07

I would put them in /opt/. The is what the standard implies in the FHS document.

There are still 2 schools of thought about this.

The first will use /opt the same way many distributions use /usr, putting application scripts under under /usr/share and the libraries in /usr/lib. The paths in this case will be /opt/bin, /opt/lib, and /opt/share.

The second will put each app in its own directory. You will end up with /opt/app1/bin, /opt/app1/lib, /opt/app1/share, /opt/app2/bin,/opt/app2/lib/ etcetera.

You can do this as a hybrid with the apps installed in /opt/app-name and sym links in /opt/share, opt/lib, etcetera pointing at the files in the application path.

It doesn't really matter which you choose as long as you document it and stick with it.

Ideally you would document the choice as in your configuration management tool, in your documentation, and in policy.

Take Care, Rik

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.