Skip to main content
Version: 1.2.1.0

Domain Name System

Update /etc/hosts file

Using a text editor, open the hosts file on each host in your cluster.

sudo vi /etc/hosts

Add a row for each host in your cluster. The line must consist of the IP address and the FQDN.

1.2.3.4 <fully.qualified.domain.name>
danger

Do not delete the following two lines from your hosts file. Deleting or changing the following lines may cause various programs that require network functionality to fail.

127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

Define the hostname

Confirm that the hostname is set by running the following command:

sudo hostname -f

This should return the <fully.qualified.domain.name> you just defined.

Use the "hostname" command to set the hostname on each host in your cluster.

sudo hostname <fully.qualified.domain.name>

Edit the network configuration file

Using a text editor, open the network configuration file on each host and set the desired network configuration for each host.

sudo vi /etc/sysconfig/network

Edit the HOSTNAME property to set the fully qualified domain name.

NETWORKING=yes
HOSTNAME=<fully.qualified.domain.name>