This article explains how to change the hostname of a Linux machine.
Content / Solution:
The default hostname is deployed based on the IP address of the machine.
Changing the hostname requires the modification of a single file, /etc/sysconfig/network and an examination of the system-wide hosts file, /etc/hosts is also recommended. After changing the hostname, a reboot of the system will be required to commit the change.
HOSTNAME=example.mydomain.com # Your FQDN goes here
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 example example.mydomain.com localhost
::1 localhost6.localdomain6 localhost6