LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2010, 08:35 AM   #1
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Rep: Reputation: 0
Standard File Paths?


Is there some sort of standards file path convention for installing softwares that I could follow through?

For example, I just learnt how to build Nginx from source. But the default binary path set by nginx is "/usr/local/nginx/sbin". I have seen a couple of tutorials which they specify the location of the installed binary and it is very different from those usual default paths. Thus, got me thinking whether is there some form of file path convention that I should follow?

A couple of samples (file paths) people usually used:

Log Files: /var/log
Binary: /usr/sbin or /usr/bin or /opt/

Is there some kind of list which states where do those packages on Debian.org Repository usually installed to?

Last edited by Greedyh4mster; 08-23-2010 at 08:37 AM.
 
Old 08-23-2010, 08:48 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
if you are compiling from source then you can use various options.
like
--prefix
--sbin-path
--conf-path

for more details you can refer installation/manual guide of Nginx.
for an example

Code:
./configure
    --sbin-path=/usr/local/nginx/nginx
    --conf-path=/usr/local/nginx/nginx.conf
    --pid-path=/usr/local/nginx/nginx.pid
    --with-http_ssl_module
    --with-pcre=../pcre-4.4
    --with-zlib=../zlib-1.1.3
HTH
 
Old 08-23-2010, 08:54 AM   #3
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Yup. I understand about that.

However when I read several other tutorials; Most of them are using /opt/ as the installation folder. Is there some kind of reason for doing so?

Another example that I have found:

For config files, people usually put it at "/etc/$NAMEofPROGRAM"

Therefore, I am wondering is there some kind of installation path convention which determines where and what type of files to keep at?
 
Old 08-23-2010, 09:14 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by Greedyh4mster View Post
Therefore, I am wondering is there some kind of installation path convention which determines where and what type of files to keep at?
Yes, the Filesystem Hierarchy Standard (FHS), but it is far from universally used.
 
1 members found this post helpful.
Old 08-23-2010, 09:28 AM   #5
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
Yes, the Filesystem Hierarchy Standard (FHS), but it is far from universally used.
Thanks for the links!

Since it is far from being universally used, is there kind of list for commonly used file paths and their associated type of files?
 
Old 08-23-2010, 09:35 AM   #6
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Quote:
Originally Posted by Greedyh4mster View Post
Thanks for the links!

Since it is far from being universally used, is there kind of list for commonly used file paths and their associated type of files?
From my limited experience ( 3 distrobutions ) it seems to depend on the distrobution itself, and what was done in the ones it was derived from.
 
Old 08-23-2010, 09:51 AM   #7
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for all your inputs! Really appreciated them! Help me gain several insight to many stuffs.

I have found a similar topic to here:
http://www.linuxquestions.org/questi...or-opt-814374/

I think I will use /opt/ for compiled binaries. Much cleaner and lesser to configure.

While I will use the following for their associated types of files:

PID files: /var/run/
LOCK files: /var/lock/
LOG files: /var/log/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash - File paths into an array Bat17 Programming 5 10-31-2006 03:56 AM
Filtering a file (taking paths) kornerr Programming 4 05-15-2005 09:22 AM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 10:15 PM
file paths Mahoot Linux - Newbie 3 09-02-2003 11:48 AM
Resolving file paths... ugenn Programming 3 10-01-2002 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration