config-glibc.sgml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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>rm localtime &amp;&amp;</userinput>
  41. <userinput>ln -s ../usr/share/zoneinfo/&lt;tzselect's output&gt;
  42. localtime</userinput>
  43. </literallayout></blockquote>
  44. <para>
  45. tzselect's output can be something like <emphasis>EST5EDT</emphasis> or
  46. <emphasis>Canada/Eastern</emphasis>.
  47. </para>
  48. <para>
  49. The symlink you would create with that information would be:
  50. </para>
  51. <blockquote><literallayout>
  52. <userinput>ln -s ../usr/share/zoneinfo/EST5EDT localtime</userinput>
  53. </literallayout></blockquote>
  54. <para>
  55. Or:
  56. </para>
  57. <blockquote><literallayout>
  58. <userinput>ln -s ../usr/share/zoneinfo/Canada/Eastern localtime
  59. </userinput>
  60. </literallayout></blockquote>
  61. </sect2>