lfs/chapter07/hosts.xml
Matthew Burgess 17700191e9 Upgraded to DocBook 4.4 DTD
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4603 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2005-01-30 18:06:48 +00:00

34 lines
1.2 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-scripts-hosts">
<title>Creating the /etc/hosts File</title>
<?dbhtml filename="hosts.html"?>
<para>If a network card is to be configured, create the
<filename>/etc/hosts</filename> file by running:</para>
<screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
<literal># Begin /etc/hosts (network card version)
127.0.0.1 localhost
<replaceable>[192.168.1.1]</replaceable> <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable>
# End /etc/hosts (network card version)</literal>
EOF</userinput></screen>
<para>If a network card is not going to be configured, create the
<filename>/etc/hosts</filename> file by running:</para>
<screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
<literal># Begin /etc/hosts (no network card version)
127.0.0.1 <replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable> <replaceable>[HOSTNAME]</replaceable> localhost
# End /etc/hosts (no network card version)</literal>
EOF</userinput></screen>
</sect1>