basic-net.xml 1.3 KB

1234567891011121314151617181920212223242526272829
  1. <sect1 id="ch06-basic-net">
  2. <title>Setting up Basic Networking</title>
  3. <?dbhtml filename="basic-net.html" dir="chapter06"?>
  4. <!-- Will clean this up later. -->
  5. <para>Here will be set up basic networking now that all the necessary
  6. software has been installed. There isn't all that much to do, really,
  7. just creating a basic <filename>/etc/hosts</filename> file, and downloading
  8. some high-quality network information files.</para>
  9. <para>The first step is to create <filename>/etc/hosts</filename>. This file
  10. contains information allowing resolution of host names to IP addresses.
  11. Create a very basic one (we'll make a better one later, but Perl needs it now
  12. for doing some tests) with the following command:</para>
  13. <para><screen><userinput>echo "127.0.0.1 $(hostname) localhost" > /etc/hosts</userinput></screen></para>
  14. <para>Now unpack the Lfs-Utils tarball again, as we're going to copy two
  15. necessary files from it. One is <filename>/etc/services</filename>, which is
  16. used to resolve service numbers to human-readable names, and the other is
  17. <filename>/etc/protocols</filename>, which does the same for protocol numbers.
  18. Copy them with the following command after you have entered the Lfs-Utils
  19. directory:</para>
  20. <para><screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen></para>
  21. </sect1>