Setting the HostnameLinux Network Administrators GuidePrevChapter 5. Configuring TCP/IP NetworkingNextSetting the HostnameMost, if not all, network applications rely on you to set the local
host's name to some reasonable value. This setting is usually made
during the boot procedure by executing the hostname
command. To set the hostname to name, enter:
# hostname nameIt is common practice to use the unqualified hostname without
specifying the domain name. For instance, hosts at the Virtual Brewery
(described in Appendix A) might be
called vale.vbrew.com or
vlager.vbrew.com. These are
their official fully qualified domain names
(FQDNs). Their local hostnames would be the first component of the
name, such as vale. However,
as the local hostname is frequently used to look up the host's IP
address, you have to make sure that the resolver library is able to
look up the host's IP address. This usually means that you have to
enter the name in /etc/hosts.
Some people suggest using the domainname command to
set the kernel's idea of a domain name to the remaining part of the
FQDN. This way you could combine the output from
hostname and domainname to get
the FQDN again. However, this is at best only half
correct. domainname is generally used to set the
host's NIS domain, which may be entirely different from the DNS domain
to which your host belongs. Instead, to ensure that the short form of
your hostname is resolvable with all recent versions of the
hostname command, either add it as an entry in your
local Domain Name Server or place the fully qualified domain name in
the /etc/hosts file. You may then use the
--fqdn argument to the
hostname command, and it will print the fully
qualifed domain name.PrevHomeNextInstalling the BinariesUpAssigning IP Addresses
Wyszukiwarka
Podobne podstrony:
x 087 2 iface addressesx 087 2 ifacex 087 2 iface interfacex 087 2 iface ifconfigx 087 2 iface verify arpx 087 2 iface simple resolvx 087 2 iface binariesx 087 2 iface netstatx 087 2 accounting zeroing counterx 087 2 cnews miscx 087 2 cnews nfsx 087 2 mail deliveryx 087 2 masq namelookupsx 087 2 firewall filteringmethodsx 087 2 accountingx 087 2 firewall filteringx 087 2 uucpwięcej podobnych podstron