Directory Structure in Linux
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Narayanan_Palasseri
Posted On:   Monday, January 14, 2008 09:37 AM

Hi


I'm a newbie to Linux Java development environment.
What would you consider as the appropriate directory for hosting the source tree of my application.

Will it be
/usr/local/myApp
OR
~/myApp
OR
/opt/myApp
OR
/var/local/myApp OR

any better location :)

Please give your suggestion.


Thank you in advance

Na'n

Re: Directory Structure in Linux

Posted By:   Robert_Lybarger  
Posted On:   Monday, January 14, 2008 08:10 PM

First thing is that there won't be "one right way" to do this... you might get differing opinions -- so you'll have to pick something you think applies to you. Now then, I wouldn't usually touch "/var" at all. Can't really explain why not in easy terms. Also, if you literally mean where you keep track of the "source code", I'd keep it underneath a standard user account (~/myapp) while it is being developed. If you ever do a backup of the "/home" directories or just the user account in particular, it's easier to get that picked up there. If you are talking about where to live when the app is deployed for general use (and under the assumption it is for use by anyone on the system) then putting the code/resources underneath /usr/local/myapp is probably the right way to go, with a convenience startup script added in /usr/local/bin (which is generally in everyone's default PATH env variable). Whether you think the source should be deployed with the app is up to you... I might put it under /usr/local/myapp/src, for example. Offline documentation directories (other than man page files) tend to vary a bit with the vintage of Linux as well as the distro in particular... so there wouldn't be much harm in just putting that in /usr/local/myapp/docs (or really wherever seems to be the most central place people will go look for it).
About | Sitemap | Contact