config-glibc.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <sect2><title>Configuring Glibc</title>
  2. <para>
  3. We need to create the /etc/nsswitch.conf file. Although glibc should provide
  4. defaults when this file is missing or corrupt, it's defaults don't work work
  5. well with networking which will be dealt with in a later chapter. Also, our
  6. timezone needs to be setup.
  7. </para>
  8. <para>
  9. Create a new file <filename>/etc/nsswitch.conf</filename> by running the
  10. following:
  11. </para>
  12. <literallayout>
  13. <userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"</userinput>
  14. # Begin /etc/nsswitch.conf
  15. passwd: files
  16. group: files
  17. shadow: files
  18. publickey: files
  19. hosts: files dns
  20. networks: files
  21. protocols: db files
  22. services: db files
  23. ethers: db files
  24. rpc: db files
  25. netgroup: db files
  26. # End /etc/nsswitch.conf
  27. <userinput>EOF</userinput>
  28. </literallayout>
  29. <para>
  30. Run the <userinput>tzselect</userinput> script and answer the questions
  31. regarding your timezone. When you're done, the script will give you the
  32. location of the timezone file you need.
  33. </para>
  34. <para>
  35. Create the <filename class="directory">/etc/localtime</filename> symlink
  36. by running:
  37. </para>
  38. <blockquote><literallayout>
  39. <userinput>cd /etc &amp;&amp;</userinput>
  40. <userinput>ln -sf ../usr/share/zoneinfo/&lt;tzselect's output&gt;
  41. localtime</userinput>
  42. </literallayout></blockquote>
  43. <para>
  44. tzselect's output can be something like <emphasis>EST5EDT</emphasis> or
  45. <emphasis>Canada/Eastern</emphasis>.
  46. </para>
  47. <para>
  48. The symlink you would create with that information would be:
  49. </para>
  50. <blockquote><literallayout>
  51. <userinput>ln -s ../usr/share/zoneinfo/EST5EDT localtime</userinput>
  52. </literallayout></blockquote>
  53. <para>
  54. Or:
  55. </para>
  56. <blockquote><literallayout>
  57. <userinput>ln -s ../usr/share/zoneinfo/Canada/Eastern localtime
  58. </userinput>
  59. </literallayout></blockquote>
  60. </sect2>