source: introduction/important/position.xml@ 0990cf7a

10.0 10.1 11.0 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 0990cf7a was 0990cf7a, checked in by Bruce Dubbs <bdubbs@…>, 17 years ago

More commas, update Makefile

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2241 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<sect1 id="intro-important-position">
2<?dbhtml filename="position.html"?>
3<title>The /usr versus /usr/local debate</title>
4
5<para><emphasis>Should I install XXX in <filename>/usr</filename> or
6<filename>/usr/local</filename>?</emphasis></para>
7
8<para>This is a question without an obvious answer for an
9<acronym>LFS</acronym> based system.</para>
10
11<para>In traditional Unix systems, <filename>/usr</filename> usually
12contains files that come with the system distribution, and the <filename>
13/usr/local</filename> tree is free for the local administrator to add things
14to. The only really hard and fast rule is that Unix distributions should not
15touch <filename>/usr/local</filename>, except perhaps for creating the basic
16directories within it.</para>
17
18<para>With Linux distributions, like Red Hat, Debian etc. a possible rule is
19that <filename>/usr</filename> is managed by the distribution's
20package system and <filename>/usr/local</filename> is not. This way the
21package manager's database knows about every file within
22<filename>/usr</filename>.</para>
23
24<para><acronym>LFS</acronym> users build their own system and so deciding where
25the system ends and local files begin is not straightforward. So the choice
26should be made in order to make things easier to administer. There are several
27reasons for dividing files between <filename>/usr</filename> and
28<filename>/usr/local</filename>.</para>
29
30<itemizedlist>
31
32<listitem><para>On a network of several machines all running <acronym>LFS</acronym>,
33or mixed <acronym>LFS</acronym> and other Linux distributions,
34<filename>/usr/local</filename> could be used to hold packages
35that are common between all the computers in the network. It can be
36<acronym>NFS</acronym> mounted or mirrored from a single server. Here local
37indicates local to the site.</para></listitem>
38
39<listitem><para>On a network of several computers all running an identical
40<acronym>LFS</acronym> system <filename>/usr/local</filename> could hold
41packages that are different between the machines. In this case local refers
42to the individual computers.</para></listitem>
43
44<listitem><para>Even on a single computer <filename>/usr/local</filename> can
45be useful if you have several distributions installed simultaneously, and want
46a place to put packages that will be the same on all of them.</para></listitem>
47
48<listitem><para>Or you might regularly rebuild your <acronym>LFS</acronym>, but
49want a place to put files that you don't want to rebuild each time. This way
50you can wipe the <acronym>LFS</acronym> file system and start from a clean
51partition every time without losing everything.</para></listitem>
52
53</itemizedlist>
54
55<para>Some people ask why not use your own directory tree, e.g., <filename>
56/usr/site</filename>, rather than <filename>/usr/local</filename>?</para>
57
58<para>There is nothing stopping you, many sites do make their own trees,
59however it makes installing new software more difficult. Automatic installers
60often look for dependencies in <filename>/usr</filename> and
61<filename>/usr/local</filename>, and if the file it is looking
62for is in <filename>/usr/site</filename> instead, the installer will
63probably fail unless you specifically tell it where to look.</para>
64
65<para><emphasis>What is the <acronym>BLFS</acronym> position on this?</emphasis>
66</para>
67
68<para>All of the <acronym>BLFS</acronym> instructions install programs in
69<filename>/usr</filename> with optional instructions to install into
70<filename>/opt</filename> for some specific packages.</para>
71
72</sect1>
Note: See TracBrowser for help on using the repository browser.