aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/hostname.xml
blob: 9addc0f2ad860b235d8fdd6ae85fab75a565414f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-scripts-hostname">
  <?dbhtml filename="hostname.html"?>

  <title>Configuring the system hostname</title>

  <indexterm zone="ch-scripts-hostname">
    <primary sortas="d-hostname">hostname</primary>
    <secondary>configuring</secondary>
  </indexterm>

  <para>Part of the job of the <command>localnet</command> script is setting the
  system's hostname. This needs to be configured in the
  <filename>/etc/sysconfig/network</filename> file.</para>

  <para>Create the <filename>/etc/sysconfig/network</filename> file and enter a
  hostname by running:</para>

<screen><userinput>echo "HOSTNAME=<replaceable>&lt;lfs&gt;</replaceable>" &gt; /etc/sysconfig/network</userinput></screen>

  <para><replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the name given
  to the computer. Do not enter the Fully Qualified Domain Name (FQDN) here. That
  information is put in the <filename>/etc/hosts</filename> file.</para>

</sect1>