<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>
LINUX GAZETTE
...making Linux just a little more fun!
Linux Installations Paths
By David Lechnyr

Linux Installation Paths

When installing software, many people are confused. "Should I install in /usr/sbin? /usr/local? /usr/local/packagename?" The additional belief in "one right way" to install software adds to this confusion. In this short article, it is hoped that some of these confusions can be illuminated so that the user can make an informed choice.

The Filesystem Hierarchy Standard (FHS) is a reference on how to manage a Unix filesystem or directory hierarchy. Unfortunately many people assume it is a standard and/or tutorial, which is opposite of their mission statement. The FHS is a subset of the Linux Standard Base (LSB), which promotes a set of standards to increase compatibility among Linux distributions and enable software applications to run on any compliant system. However, whether intentional or not, these standards tend to be adopted by Linux distribution vendors rather than by software package maintainers.

Take, for example, Samba. The default installation directory for Samba is /usr/local/samba. Many people complain that this sort of thing violates the FHS. What they fail to realize is what we have stated above: The adoption of the FHS seems to be encouraged in Linux distribution vendors rather than with Linux software maintainers. It is somewhat uncertain as to why this is and whether it is intentional or not. Regardless, the effect ends up being not unlike a dog barking at its own tail -- the audience is complaining about one thing when it was never the focus of attention in the first place. Whether intentional or not is a moot point at best; this is how it currently is playing out.

The installation location for many software packages is traditionally steeped in historical precedence. Many software maintainers assert that they install in /usr/local/packagename not out of any method or philosophy, but rather because "we've always done it that way". And in the world of well-tuned software, if it isn't broke, it isn't fixed.

Not that I disagree. Historical precedence is an important aspect. Alternately, the FHS has some excellent ideas towards standardizing the location of installed files and directories. However, it is just simply that: a philosophy without encouragement of compliance. In neither focusing or encouraging their philosophy on software package maintainers nor Linux distribution vendors, the reaction to the FHS from the Internet community seems to reflexively be from the distribution vendor. In truth, this is part of the problem.

Focus on FHS compliance, whether intentional or not, should be placed on the software developers. This will clear up some of the more traditional problems. For example:

Example 1: Before the advent of the FHS
A user installs RedHat Linux. After some time, she decides to upgrade one of the software packages by hand. No file location conflicts exist, as the installation location under RedHat Linux for each software program is determined by the software vendor. Packages installed in /usr/local/packagename will be replaced by files in the same location.
Example 2: After the advent of the FHS
A user installs RedHat Linux. After some time, he decides to upgrade one of the software packages by hand. However, his software package is installed in /usr/bin and /usr/sbin along with variable data files in /var/lib/packagename. The upgraded software package he just downloaded installs everything by default into /usr/local/packagename. Being an average Linux user, he is somewhat perplexed by what conflicts this may introduce into his system and is unsure how to proceed.

Personally, I think we're focusing on the wrong angle for FHS-compliance. An alternate future reality, which would be much better, would be:

Example 3: In the future
A user installs RedHat Linux. After some time, she decides to upgrade one of the software packages by hand. No file location conflicts exist, as the installation location under RedHat Linux for each software program is determined by the FHS-compliant software vendor (and not by RedHat). RedHat itself makes no modifications to the installation defaults for each software package. Packages installed in on the system, whether by RPM or compiled by hand, will replaced files on the system in the exact same location.

With the upcoming release of version 2.3 of the FHS, it becomes even more important that we focus on the right issues. If we are to succeed at minimizing confusion in the world of installable Linux software, we need to not only focus on our philosophy and method but also on the correct audience. Hopefully, this article has helped make you more aware of the issues at hand.


Some of the many distributions that attempt to maintain LFH-compliance include:

 

[BIO] David Lechnyr is a Network Administrator for the Human Resources department at the University of Oregon. He holds a Master's Degree in Social Work along with his MCSE+I, CNE, and CCNA certifications. He has been working with Linux for the past seven years, with an emphasis on systems security, network troubleshooting, and PHP/MySQL integration. He is also the author of the Unofficial Samba HOWTO and the Linux+Apache+MySQL+PHP HOWTO.


Copyright © 2003, David Lechnyr. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 93 of Linux Gazette, August 2003

<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>