LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-28-2004, 08:57 PM   #1
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Why is the directory called /usr/local.


I have a mostly theoretical question about a LFHS recommendation.

According to the Linux File-system Hierarchy Standard, programs you install yourself, such as tarball installations should use the /usr/local directory as the installation base. This I understand, but they recommend that the /usr/local directory be a static / shared directory.

from the FHS:
Quote:
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.
If /usr/local is shareable amongst a group of hosts, where would the base installation directory be for the local host itself?
 
Old 06-28-2004, 09:46 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Ok:

machine A is exporting its /usr/local
machine B is mounting machine A's export

There's no rule that says machine B must mount machine A's /usr/local export at machine B's /usr/local filesystem. Mount it somewhere else, and modify the path appropriately.

machine A retains the "local" sense of /usr/local even though it is exported
machine B retains an explicit /usr/local of it's own, while accessing machine A's /usr/local at some other point in the filesystem.

Is that what you were getting at, or did I miss the question?
 
Old 06-29-2004, 04:03 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Original Poster
Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The main purpose of this directory is that it persists between upgrades, and isn't part of the install. The word local to me implies that it is local to each machine. Perhaps the true sense is that it is local to the site and I'm just looking at it wrong.

I realize that if you want a directory local to each machine, you could make your own.
 
Old 06-29-2004, 01:56 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
I'm not quite sure I follow you. What is the complication by viewing "local" to mean specific to that machine? I'm looking for an example of the conflict you're getting at to help me understand where you're coming from.

Last edited by Dark_Helmet; 06-29-2004 at 01:57 PM.
 
Old 06-29-2004, 05:31 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Original Poster
Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Suppose you install a program from a tarball with the usual, configure, make, make install steps.
The configure phase will analyse how the program and libraries will be compiled. A system with an AMD chip may have a library compiled differently then one of the other hosts with dual-xeon's for instance. I guess the answer is to only share the /usr/local directories between hosts with similar hardware configurations.

Mainly, my preconception was that the /usr hierarchy would be shared, and /usr/local would contain items specific to the host. Either programs or libraries that are compiled to take advantage of specific hardware, or programs that the root user on that host would install due to personal preferences.

Perhaps, I just haven't worked in an environment with a large number of computers administered centrally, were programs are never installed on the local host, but on a central server.

The naming may also be due to historic reasons, and the usage may have changed over time.

Maybe my question should be, if your system has a shared /usr/local hierarchy, where is the standard place for installing programs that are local to an individual host, or does the LFHS standard recommend against this because of the administrative problems this would cause allowing programs installed on individual hosts.
 
Old 06-29-2004, 05:48 PM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
I haven't worked in a large environment like you describe either. So we're both winging it sort of. My perspective on the /usr/local thing was from the idea of having specialized machines for a given task. Have one machine handle database management for customer orders for instance. Have another handle web serving or whatever. Those specialized machines don't necessarily export their /usr/local as a means to become an application server. They might be exported to provide configuration information or just pure data; allowing the client machines read access to the database, straight html file access without having to go through a browser, or other types of things. The argument could be made that why not just export the configuration or data files rather than the whole /usr/local filesystem. You could do that, but it might get messy if data is not stored in a nice filesystem hierarchy, or if the machine is set up to handle 2 or 3 specialized roles (you'd need one export for each set of data).

You're right about the hardware difference for applications though. My only thought about that would be that it isn't meant to share applications in that way. At least, not without a wrapper. Have the exporting machine provide a shell/perl/python script that sends a custom request from the client to the specialized machine to run program X.
 
Old 06-30-2004, 02:05 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Original Poster
Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
For myself the matter is purely academic. I just need to know that the programs I install will go into /usr or /usr/local, and that an upgrade will not touch /usr/local. I can see how a system with 50 or 100 homogeneous hosts sharing /usr and /usr/local would be much easier to administer. Performing a security upgrade on one would take care of the others for instance. It seems to me that the LFHS had to balance the practices of large commercial sites, what the software developers are doing, the layouts the distributions use, and the single end user.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
/usr vs /usr/local on linuxpackages.net merchtemeagle Slackware 4 10-18-2005 03:09 PM
including usr/local/lib directory Quest101 Linux - Software 3 01-01-2005 04:13 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
/usr/local/vmware ?? directory change!! paulo Linux - Security 4 07-09-2003 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:18 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