diff options
author | Timothy Bauscher <timothy@linuxfromscratch.org> | 2003-01-05 16:19:00 +0000 |
---|---|---|
committer | Timothy Bauscher <timothy@linuxfromscratch.org> | 2003-01-05 16:19:00 +0000 |
commit | 5e40325fc2ddf3e60af6d47cb434e26099aebce6 (patch) | |
tree | 22135e55be865d0809f7be116369b7d1b52cca50 /chapter05/installasuser.xml | |
parent | 2ae2d484bd3ccf46810df229c7986b1f5581ccbb (diff) |
Applied a modified version of Alex's patch to split the in two.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2283 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05/installasuser.xml')
-rw-r--r-- | chapter05/installasuser.xml | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/chapter05/installasuser.xml b/chapter05/installasuser.xml deleted file mode 100644 index c231925ea..000000000 --- a/chapter05/installasuser.xml +++ /dev/null @@ -1,62 +0,0 @@ -<sect1 id="ch05-installasuser"> -<title>Install all software as an unprivileged user</title> -<?dbhtml filename="installasuser.html" dir="chapter05"?> - -<para>When you are logged in as root during Chapter 5, it is possible -that some files of your host system will be overwritten by the ones -you'll build in Chapter 5. There can be all kinds of reasons for this -to happen, for example because the $LFS environment variable is not -set. Overwriting some files from your host system will most likely -cause all kinds of problems, so it's a good idea to be logged in as -an unprivileged user during Chapter 5. To make sure the environment -is as clean as possible, we'll create a new user "lfs" that can be -used while building the static installation. Issuing the following -commands as root will create a new user "lfs":</para> - -<para><screen><userinput>useradd -s /bin/bash -m lfs && -passwd lfs</userinput></screen></para> - -<para>Now we need to give proper permissions to the <filename -class="directory">$LFS/static</filename> directory so user "lfs" can write -to it:</para> - -<para><screen><userinput>chown -R lfs $LFS/static</userinput></screen></para> - -<para>You have to login as user <emphasis>lfs</emphasis> now to continue -with the rest of this chapter. You can do this two ways: either the normal -way through the console or the display manager, or with -<userinput>su - lfs</userinput>. When you're working as user -<emphasis>lfs</emphasis>, type the following commands to set up a good -environment to work in:</para> - -<para><screen><userinput>cat > ~lfs/.bash_profile << "EOF" -umask 022 - -LFS=/mnt/lfs -LC_ALL=POSIX -CC='gcc -s' -export LFS LC_ALL CC -EOF -source ~/.bash_profile</userinput></screen></para> - -<para>This profile makes sure the umask is set to 022 so newly created -files and directories will have the correct permissions. It is advisable -to keep this setting throughout your LFS installation. Also, the $LFS, -$LC_ALL, and $CC environment variables are set. $LFS has been explained -in previous chapters already. $LC_ALL is a variable that is used for -internationalization.</para> - -<para>When your host distribution uses a glibc version older than 2.2.4, -having $LC_ALL set to something other than "C" or "POSIX" while working -through Chapter 5 may cause trouble when you exit the chroot environment -of Chapter 6 and try to return to it. By setting this to "POSIX" ("C" -is an alias for "POSIX") we ensure that everything will work as expected -in the chroot environment.</para> - -<para>$CC is a variable we set in order to prevent debugging symbols from -being compiled into our static packages. By omitting these symbols during -the linking stage of compilation, we save hard drive space and decrease -our build time.</para> - -</sect1> - |