[4122007] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[f45b1953] | 8 | <sect1 id="intro-important-position">
|
---|
[a0f03b0] | 9 | <sect1info>
|
---|
[5cd0959d] | 10 | <othername>$LastChangedBy$</othername>
|
---|
| 11 | <date>$Date$</date>
|
---|
[a0f03b0] | 12 | </sect1info>
|
---|
[71e06e23] | 13 | <?dbhtml filename="position.html"?>
|
---|
[f45b1953] | 14 | <title>The /usr versus /usr/local debate</title>
|
---|
| 15 |
|
---|
[acfc391] | 16 | <para><emphasis>Should I install XXX in <filename>/usr</filename> or
|
---|
| 17 | <filename>/usr/local</filename>?</emphasis></para>
|
---|
[f45b1953] | 18 |
|
---|
[acfc391] | 19 | <para>This is a question without an obvious answer for an
|
---|
| 20 | <acronym>LFS</acronym> based system.</para>
|
---|
[f45b1953] | 21 |
|
---|
[a4be499] | 22 | <para>In traditional Unix systems, <filename>/usr</filename> usually
|
---|
[acfc391] | 23 | contains files that come with the system distribution, and the <filename>
|
---|
| 24 | /usr/local</filename> tree is free for the local administrator to add things
|
---|
[a4be499] | 25 | to. The only really hard and fast rule is that Unix distributions should not
|
---|
[acfc391] | 26 | touch <filename>/usr/local</filename>, except perhaps for creating the basic
|
---|
| 27 | directories within it.</para>
|
---|
[f45b1953] | 28 |
|
---|
[5628618e] | 29 | <para>With Linux distributions, like Red Hat, Debian etc. a possible rule is
|
---|
[f45b1953] | 30 | that <filename>/usr</filename> is managed by the distribution's
|
---|
| 31 | package system and <filename>/usr/local</filename> is not. This way the
|
---|
| 32 | package manager's database knows about every file within
|
---|
| 33 | <filename>/usr</filename>.</para>
|
---|
| 34 |
|
---|
[acfc391] | 35 | <para><acronym>LFS</acronym> users build their own system and so deciding where
|
---|
| 36 | the system ends and local files begin is not straightforward. So the choice
|
---|
| 37 | should be made in order to make things easier to administer. There are several
|
---|
[f45b1953] | 38 | reasons for dividing files between <filename>/usr</filename> and
|
---|
| 39 | <filename>/usr/local</filename>.</para>
|
---|
| 40 |
|
---|
| 41 | <itemizedlist>
|
---|
| 42 |
|
---|
[9abe2d1] | 43 | <listitem><para>On a network of several machines all running <acronym>LFS</acronym>,
|
---|
| 44 | or mixed <acronym>LFS</acronym> and other Linux distributions,
|
---|
[acfc391] | 45 | <filename>/usr/local</filename> could be used to hold packages
|
---|
[f45b1953] | 46 | that are common between all the computers in the network. It can be
|
---|
[acfc391] | 47 | <acronym>NFS</acronym> mounted or mirrored from a single server. Here local
|
---|
| 48 | indicates local to the site.</para></listitem>
|
---|
[f45b1953] | 49 |
|
---|
| 50 | <listitem><para>On a network of several computers all running an identical
|
---|
[acfc391] | 51 | <acronym>LFS</acronym> system <filename>/usr/local</filename> could hold
|
---|
| 52 | packages that are different between the machines. In this case local refers
|
---|
| 53 | to the individual computers.</para></listitem>
|
---|
[f45b1953] | 54 |
|
---|
| 55 | <listitem><para>Even on a single computer <filename>/usr/local</filename> can
|
---|
| 56 | be useful if you have several distributions installed simultaneously, and want
|
---|
[acfc391] | 57 | a place to put packages that will be the same on all of them.</para></listitem>
|
---|
[f45b1953] | 58 |
|
---|
[acfc391] | 59 | <listitem><para>Or you might regularly rebuild your <acronym>LFS</acronym>, but
|
---|
| 60 | want a place to put files that you don't want to rebuild each time. This way
|
---|
[666f6de] | 61 | you can wipe the <acronym>LFS</acronym> file system and start from a clean
|
---|
[acfc391] | 62 | partition every time without losing everything.</para></listitem>
|
---|
[f45b1953] | 63 |
|
---|
| 64 | </itemizedlist>
|
---|
| 65 |
|
---|
[0990cf7a] | 66 | <para>Some people ask why not use your own directory tree, e.g., <filename>
|
---|
| 67 | /usr/site</filename>, rather than <filename>/usr/local</filename>?</para>
|
---|
[f45b1953] | 68 |
|
---|
[acfc391] | 69 | <para>There is nothing stopping you, many sites do make their own trees,
|
---|
| 70 | however it makes installing new software more difficult. Automatic installers
|
---|
[f45b1953] | 71 | often look for dependencies in <filename>/usr</filename> and
|
---|
| 72 | <filename>/usr/local</filename>, and if the file it is looking
|
---|
| 73 | for is in <filename>/usr/site</filename> instead, the installer will
|
---|
[acfc391] | 74 | probably fail unless you specifically tell it where to look.</para>
|
---|
[f45b1953] | 75 |
|
---|
[acfc391] | 76 | <para><emphasis>What is the <acronym>BLFS</acronym> position on this?</emphasis>
|
---|
| 77 | </para>
|
---|
[f45b1953] | 78 |
|
---|
[acfc391] | 79 | <para>All of the <acronym>BLFS</acronym> instructions install programs in
|
---|
[5f51d218] | 80 | <filename>/usr</filename> with optional instructions to install into
|
---|
| 81 | <filename>/opt</filename> for some specific packages.</para>
|
---|
[f45b1953] | 82 |
|
---|
| 83 | </sect1>
|
---|