aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/hosts.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2001-02-15 15:26:52 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2001-02-15 15:26:52 +0000
commitb08f4096533577934b885fa9df41d3881d141612 (patch)
tree8e5ffc0ba65ac34d97cd6a896d33b85a897a6da8 /chapter07/hosts.xml
parentad08014624938a3a3bfd1b44e8b27d02c7b06dd8 (diff)
Initial XML commit
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@174 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/hosts.xml')
-rw-r--r--chapter07/hosts.xml83
1 files changed, 83 insertions, 0 deletions
diff --git a/chapter07/hosts.xml b/chapter07/hosts.xml
new file mode 100644
index 000000000..676291981
--- /dev/null
+++ b/chapter07/hosts.xml
@@ -0,0 +1,83 @@
+<sect1 id="ch09-hosts">
+<title>Creating the /etc/hosts file</title>
+
+<para>
+If you want to configure a network card, you have to decide on the
+IP-address, FQDN and possible aliases for use in the /etc/hosts file. An
+example is:
+</para>
+
+<blockquote><literallayout>
+
+ &lt;my-IP&gt; myhost.mydomain.org aliases
+
+</literallayout></blockquote>
+
+<para>
+Make sure the IP-address is in the private network IP-address range.
+Valid ranges are:
+</para>
+
+<blockquote><literallayout>
+
+ Class Networks
+ A 10.0.0.0
+ B 172.16.0.0 through 172.31.0.0
+ C 192.168.0.0 through 192.168.255.0
+
+</literallayout></blockquote>
+
+<para>
+A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
+be www.linuxfromscratch.org
+</para>
+
+<para>
+If you're not going to use a network card, you still need to come up with a
+FQDN. This is necessary for programs like Sendmail to operate correctly (in
+fact; Sendmail won't run when it can't determine the FQDN).
+</para>
+
+<para>
+If you don't configure a network card, create a new file
+<filename>/etc/hosts</filename> by running:
+</para>
+
+<literallayout>
+
+<userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
+# Begin /etc/hosts (no network card version)
+
+127.0.0.1 www.mydomain.com &lt;value of HOSTNAME&gt; localhost
+
+# End /etc/hosts (no network card version)
+<userinput>EOF</userinput>
+
+</literallayout>
+
+<para>
+If you do configure a network card, create a new file
+<filename>/etc/hosts</filename> containing:
+</para>
+
+<literallayout>
+
+<userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
+# Begin /etc/hosts (network card version)
+
+127.0.0.1 localhost.localdomain localhost
+192.168.1.1 www.mydomain.org &lt;value of HOSTNAME&gt;
+
+# End /etc/hosts (network card version)
+<userinput>EOF</userinput>
+
+</literallayout>
+
+<para>
+Of course, change the 192.168.1.1 and www.mydomain.org to your own
+liking (or requirements if you are assigned an IP-address by a network/system
+administrator and you plan on connecting this machine to that network).
+</para>
+
+</sect1>
+