basic-net.xml 1.3 KB

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