1
0

hosts.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-scripts-hosts">
  7. <title>Creating the /etc/hosts File</title>
  8. <?dbhtml filename="hosts.html"?>
  9. <para>If a network card is to be configured, create the
  10. <filename>/etc/hosts</filename> file by running:</para>
  11. <screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
  12. <literal># Begin /etc/hosts (network card version)
  13. 127.0.0.1 localhost
  14. <replaceable>[192.168.1.1]</replaceable> <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable>
  15. # End /etc/hosts (network card version)</literal>
  16. EOF</userinput></screen>
  17. <para>If a network card is not going to be configured, create the
  18. <filename>/etc/hosts</filename> file by running:</para>
  19. <screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
  20. <literal># Begin /etc/hosts (no network card version)
  21. 127.0.0.1 <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable> localhost
  22. # End /etc/hosts (no network card version)</literal>
  23. EOF</userinput></screen>
  24. </sect1>