config-glibc.xml 3.1 KB

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