Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installation Directory 1

Status
Not open for further replies.

CodeDeficitDisorder

Technical User
Joined
Jul 18, 2002
Messages
66
Location
US
Is there a norm for where to install programs on a Linux PC? In Windows, people typically install in c:\program files\ as the norm for example.

Is there a difference between where I would install Apache vs. where I would install Mozilla based on the difference in functionality?

Thanks!

 

Very generally speaking, traditionally user compiled and added programs got installed under /usr/local. With the proliferation of packaging formats like RPM and APT and their database backends which store the locations of files the packages install, this has become less the case and software packages are becoming more tightly integrated into the file structure.

That being said, it's not entirely obvious where things should be installed, though an attempt to standardize file locations was made in the early 90's. I'm not sure where it still stands, but a google search for 'common file structure unix' will give you several good introductions to the conventions.

In the mean time, get friendly with your package management system and know how to query what the file database.

For example, with RPM to know what package a file is part of do 'rpm -qf /path/to/file'. To find a list of all files in a package (installed) do 'rpm -ql package', or (not installed) 'rpm -qlp package.rpm'.
 
I thank you for the reply. It is difficult to step out of my Windows high-heels and into my Linux combat boots and think about how wild the west really is at this point. I wonder how many posts it'll take before this all starts making sense, lol.
 
adding this to erics post:
Most software allows to be installed where the user likes.
When building from source, you can tell it:
Code:
./configure --install-prefix=/here/is/my/curious/location
but if you don't give an argument, mostly /usr/local is used.
Programs very basic to the os go to
/bin (cat, cp, ls)
System-related ones to
/sbin (fsck, mkswap)
or
/usr/bin
/usr/sbin
/usr/local/bin
some x11-programs
/usr/X11R6/bin
...

Docs, manpages etc. are installed to different locations (often /usr/share/man /usr/share/...) and configuration-files to /etc.

Bigger cross-platform programs like jdk, oracle, ... have their own idea for placing files, and do it in similar ways across platforms.



seeking a job as java-programmer in Berlin:
 
I used to install progs under /opt from, the unix days. Now, as my Linux installation is only used by myself, I usually install stuff in a folder called apps under my home folder and symlink out the files to other parts of the filesystem. This way, when I need to backup my system to do some funky stuff, I just backup my home folder, period!


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top