config-glibc.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2><title>Configuring Glibc</title>
  3. <para>We need to create the /etc/nsswitch.conf file. Although glibc should
  4. provide defaults when this file is missing or corrupt, its defaults don't work
  5. well with networking. That is dealt with in a later chapter. Also, our
  6. timezone needs 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>The <userinput>tzselect</userinput> script has to be run and the
  25. questions regarding your timezone have to be answered.
  26. When you're done, the script will give the
  27. location of the needed timezone file.</para>
  28. <para> Create the <filename class="directory">/etc/localtime</filename> symlink
  29. by running:</para>
  30. <para><screen><userinput>ln -sf ../usr/share/zoneinfo/&lt;tzselect's output&gt; /etc/localtime</userinput></screen></para>
  31. <para>tzselect's output can be something like <emphasis>EST5EDT</emphasis> or
  32. <emphasis>Canada/Eastern</emphasis>.</para>
  33. <para>The symlink you'd create with that information would be:</para>
  34. <para><screen><userinput>ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime</userinput></screen></para>
  35. <para>Or:</para>
  36. <para><screen><userinput>ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen></para>
  37. </sect2>
  38. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  39. <sect2>
  40. <title>Configuring Dynamic Loader</title>
  41. <para>By default, the dynamic loader
  42. (<filename>/lib/ld-linux.so.2</filename>) searches through <filename
  43. class="directory">/lib</filename> and <filename
  44. class="directory">/usr/lib</filename> for dynamic libraries that are needed
  45. by programs when you run them. However, if there are libraries in
  46. directories other than <filename class="directory">/lib</filename> and
  47. <filename class="directory">/usr/lib</filename>, you need to add them to
  48. the <filename>/etc/ld.so.conf</filename> file for the dynamic
  49. loader to find them. Two directories that are commonly known to contain
  50. additional libraries are <filename
  51. class="directory">/usr/local/lib</filename> and <filename
  52. class="directory">/opt/lib</filename>, so we add those directories to the
  53. dynamic loader's search path.</para>
  54. <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
  55. following:</para>
  56. <para><screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"</userinput>
  57. # Begin /etc/ld.so.conf
  58. /usr/local/lib
  59. /opt/lib
  60. # End /etc/ld.so.conf
  61. <userinput>EOF</userinput></screen></para>
  62. </sect2>