473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why are installation prefixes all over the place?

pbmods
5,821 Expert 4TB
Today while troubleshooting a server that didn't want to upgrade to PHP5 (who knew that if you add the line in httpd.conf to load the php5 module and forget to comment out the line in httpd.conf that tries to load the php4 module, httpd will die with a segfault?), I was ready to pull my hair out.

See, when I compile programs for my development server, I leave the prefix at its default value (e.g., /usr/local). Everything installs really nicely, I know where to find everything, and I don't have to kludge around setting additional include directories when I have to compile programs with dependencies.

But when I went to recompile PHP 5, here's what the configure line for the previous installation started with:

Expand|Select|Wrap|Line Numbers
  1. ./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
WHY is all that junk in there?

And this is not the first time I've seen this; almost EVERY server that comes preconfigured has stuff installed all over the place (you would be amazed at some of the locations I've seen MySQL datadirs installed!).

Obviously, people must be doing this for a reason, and I would really hope that's it's a really, really good reason. But I have no idea what that is.

What's going on?

Thanks for your time.
Jun 27 '07 #1
2 1217
prn
254 Expert 100+
Hi pb,

WHY is all that junk in there?
As usual, the answer depends partly on what level of "why" you are asking about. For example, at a fairly superficial level, a typical application install puts a number of different kinds of files onto your system. Man pages normally reside in a fairly small number of places and the man application needs to know where to look for them. Some systems, e.g. Solaris, typically use a MANPATH environment variable to find all the man pages you might want to use. The Fedora box sitting under my desk does not have a MANPATH variable, but does have several "man" directories where man does find its pages. I'm not sure where it keeps track of them, but I doubt that it would automatically find man pages in, say, /usr/local/foo/man/1 without help. Even on the Solaris boxes I run, I doubt that I'd want to add each application's man pages to my MANPATH. Similar considerations apply to LD_LIBRARY_PATH and others. The administration of how man or the linker or loader or various other functions can find their files becomes a lot easier if the files those functions need are in a relatively small number of places.

So, the "--libdir=/usr/lib" part is there because the loader is going to need to know where the libraries are. /usr/lib is an obvious default location, but you could choose to override that for various reasons.

Alternatively, you might be asking why /usr/lib should be an obvious default location and the answer to that is historical rather than (strictly speaking) logical. Basically, the /usr part of the directory tree was intended for the "user" of the computer (i.e., the sysadmin) to install stuff that wasn't originally part of the OS. By now, there is a lot of stuff that wasn't originally part of the OS that didn't originally come with a Unix(-like) OS, so the entire /usr directory subtree is rather poorly named.

On another hand, another level of "why" might be "why should all of this stuff be configurable?" And that basically is because there are some pretty non-standard systems around. If you normally take the defaults, then your life is going to be a lot simpler than the folks who put stuff in really odd places. But the PHP folks are at least trying to allow you to put things in the odd places. For example, one of my (by now mostly former) responsibilities is a 64-node Linux cluster. Each node has its own system disk, but they all share the /home filesystem, which is NFS mounted to all the nodes. This means that a lot of the stuff that all the nodes need can actually sit on the /home filesystem with symlinks from places like /usr/local. Much of that software requires being situated in /usr/local/something, but in order to turn a nightmare into a lesser nightmare (a nightfoal?) I used those symlinks to allow a single copy of the software across the cluster. Something that allows itself to reside painlessly in /home/local/bin is a real blessing in cases like this.

But if your question was really rhetorical and soliciting commiseration rather than information, you do have my sympathy. :)

Best Regards,
Paul
Jun 27 '07 #2
pbmods
5,821 Expert 4TB
Heya, Paul.

Thanks for your response (and for the sympathy, why not).

Good point about the 'non-standard system'.

A good chunk of my frustration really stems from finding stuff installed in places where there just doesn't seem to be a good reason for it to be there.

I guess I should modify my question a little:

What is it about commercial webservers (or at least the ones I've had to administer) that whoever (or whatever, since it's probably automated) sets it up can't use a simple '--prefix=/usr' or '--prefix=/usr/local'?
Jun 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Chris Spencer | last post by:
Does anyone know how to make ElementTree preserve namespace prefixes in parsed xml files? The default behavior is to strip a document of all prefixes and then replace them autogenerated prefixes...
0
by: S ML | last post by:
Hello, I use the Xerces XS* classes to parse and get the definition of an XML schema. I don't seem to find a way to get the namespace prefixes using this framework and I read somewhere that the...
5
by: InstallAware | last post by:
For Press Inquiries: Sinan Karaca InstallAware Software Corporation 336 Guerrero Street, San Francisco CA 94103 415 358 4094 (voice/fax) sinank@installaware.com http://www.installaware.com/ ...
6
by: Nels Olsen | last post by:
Our company is rewriting our product in .NET. The old product is in PowerBuilder, which is heavy on Hungarian notation. We are approaching the time where we have to finalize naming conventions for...
4
by: Samuel R. Neff | last post by:
I'm writing an xslt in vs.net 2003 and in order to get intellisense on the html content I added the default namespace declaration xmlns="http://schemas.microsoft.com/intellisense/ie5". However,...
10
by: Simon Brooke | last post by:
I'm struggling to understand what 'exclude-result-prefixes' does and is for; the language of the standard http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#literal-result-element is not...
4
by: Will Honea | last post by:
Wanting to look at V9, I attempted to install Db2 Express-C on a Suse Linux box I use as a sandbox. Since I was less that thorough when removing previous installations of V8 and V7, the...
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.