config-glibc.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 timezone 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 timezone 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 timezone, 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>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
  32. the name of the timezone that the <userinput>tzselect</userinput> script
  33. gave you.</para>
  34. </sect2>
  35. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  36. <sect2>
  37. <title>Configuring Dynamic Loader</title>
  38. <para>By default, the dynamic loader
  39. (<filename>/lib/ld-linux.so.2</filename>) searches through <filename
  40. class="directory">/lib</filename> and <filename
  41. class="directory">/usr/lib</filename> for dynamic libraries that are needed
  42. by programs when you run them. However, if there are libraries in
  43. directories other than <filename class="directory">/lib</filename> and
  44. <filename class="directory">/usr/lib</filename>, you need to add them to
  45. the <filename>/etc/ld.so.conf</filename> file for the dynamic
  46. loader to find them. Two directories that are commonly known to contain
  47. additional libraries are <filename
  48. class="directory">/usr/local/lib</filename> and <filename
  49. class="directory">/opt/lib</filename>, so we add those directories to the
  50. dynamic loader's search path.</para>
  51. <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
  52. following:</para>
  53. <para><screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"</userinput>
  54. # Begin /etc/ld.so.conf
  55. /usr/local/lib
  56. /opt/lib
  57. # End /etc/ld.so.conf
  58. <userinput>EOF</userinput></screen></para>
  59. </sect2>