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