[4595a37] | 1 | <sect2><title> </title><para> </para></sect2>
|
---|
| 2 |
|
---|
[6370fa6] | 3 | <sect2><title>Configuring Glibc</title>
|
---|
| 4 |
|
---|
[d3d229f] | 5 | <para>We need to create the <filename>/etc/nsswitch.conf</filename> file,
|
---|
| 6 | because, although Glibc provides defaults when this file is missing or corrupt,
|
---|
[3a788f0c] | 7 | the Glibc defaults don't work well with networking. Also, our time zone needs
|
---|
[d3d229f] | 8 | to be set up.</para>
|
---|
[6370fa6] | 9 |
|
---|
[b822811] | 10 | <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
|
---|
| 11 | following:</para>
|
---|
[6370fa6] | 12 |
|
---|
[21ba4e3] | 13 | <screen><userinput>cat > /etc/nsswitch.conf << "EOF"</userinput>
|
---|
[6370fa6] | 14 | # Begin /etc/nsswitch.conf
|
---|
| 15 |
|
---|
| 16 | passwd: files
|
---|
| 17 | group: files
|
---|
| 18 | shadow: files
|
---|
| 19 |
|
---|
| 20 | publickey: files
|
---|
| 21 |
|
---|
| 22 | hosts: files dns
|
---|
| 23 | networks: files
|
---|
| 24 |
|
---|
| 25 | protocols: db files
|
---|
| 26 | services: db files
|
---|
| 27 | ethers: db files
|
---|
| 28 | rpc: db files
|
---|
| 29 |
|
---|
| 30 | netgroup: db files
|
---|
| 31 |
|
---|
| 32 | # End /etc/nsswitch.conf
|
---|
[21ba4e3] | 33 | <userinput>EOF</userinput></screen>
|
---|
[6370fa6] | 34 |
|
---|
[3a788f0c] | 35 | <para>To find out what time zone you're in, run the following script:</para>
|
---|
[b822811] | 36 |
|
---|
[21ba4e3] | 37 | <screen><userinput>tzselect</userinput></screen>
|
---|
[b822811] | 38 |
|
---|
[d3d229f] | 39 | <para>When you've answered a few questions about your location, the script will
|
---|
[3a788f0c] | 40 | output the name of your time zone, something like <emphasis>EST5EDT</emphasis>
|
---|
[d3d229f] | 41 | or <emphasis>Canada/Eastern</emphasis>. Then create the
|
---|
[6e50755] | 42 | <filename>/etc/localtime</filename> file by running:</para>
|
---|
[b822811] | 43 |
|
---|
[b3adaba] | 44 | <screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime</userinput></screen>
|
---|
[6370fa6] | 45 |
|
---|
[dcca029] | 46 | <para>The meaning of the option:</para>
|
---|
| 47 |
|
---|
| 48 | <itemizedlist>
|
---|
| 49 | <listitem><para><userinput>--remove-destination</userinput>: This is needed to
|
---|
| 50 | force removal of the already existing symbolic link. The reason why we copy
|
---|
| 51 | instead of symlink is to cover the situation where <filename>/usr</filename> is
|
---|
| 52 | on a separate partition. This could matter, for example, when booted into single
|
---|
| 53 | user mode.</para></listitem>
|
---|
| 54 | </itemizedlist>
|
---|
| 55 |
|
---|
[d3d229f] | 56 | <para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
|
---|
[3a788f0c] | 57 | the name of the time zone that the <userinput>tzselect</userinput> script
|
---|
[d3d229f] | 58 | gave you.</para>
|
---|
| 59 |
|
---|
[6370fa6] | 60 | </sect2>
|
---|
| 61 |
|
---|
[4f8a3af9] | 62 | <sect2><title> </title><para> </para></sect2>
|
---|
| 63 |
|
---|
| 64 | <sect2>
|
---|
| 65 | <title>Configuring Dynamic Loader</title>
|
---|
| 66 |
|
---|
| 67 | <para>By default, the dynamic loader
|
---|
| 68 | (<filename>/lib/ld-linux.so.2</filename>) searches through <filename
|
---|
| 69 | class="directory">/lib</filename> and <filename
|
---|
| 70 | class="directory">/usr/lib</filename> for dynamic libraries that are needed
|
---|
| 71 | by programs when you run them. However, if there are libraries in
|
---|
| 72 | directories other than <filename class="directory">/lib</filename> and
|
---|
| 73 | <filename class="directory">/usr/lib</filename>, you need to add them to
|
---|
| 74 | the <filename>/etc/ld.so.conf</filename> file for the dynamic
|
---|
| 75 | loader to find them. Two directories that are commonly known to contain
|
---|
| 76 | additional libraries are <filename
|
---|
| 77 | class="directory">/usr/local/lib</filename> and <filename
|
---|
| 78 | class="directory">/opt/lib</filename>, so we add those directories to the
|
---|
| 79 | dynamic loader's search path.</para>
|
---|
| 80 |
|
---|
| 81 | <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
|
---|
| 82 | following:</para>
|
---|
| 83 |
|
---|
[21ba4e3] | 84 | <screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput>
|
---|
[4f8a3af9] | 85 | # Begin /etc/ld.so.conf
|
---|
| 86 |
|
---|
| 87 | /usr/local/lib
|
---|
| 88 | /opt/lib
|
---|
| 89 |
|
---|
| 90 | # End /etc/ld.so.conf
|
---|
[21ba4e3] | 91 | <userinput>EOF</userinput></screen>
|
---|
[4f8a3af9] | 92 |
|
---|
| 93 | </sect2>
|
---|
| 94 |
|
---|