Changing the hostname and resolving a fully qualified domain name
In this recipe we will learn how to change the hostname and resolve the Fully Qualified Domain Name (FQDN) of your server.
The process of setting the hostname is typically associated with the installation process but on many occasions there comes a time when the name used is either incorrect for a technical reason or you just don't like it any more. For some people the name of the server lacks importance, but for many others, a good server demands a good name and so it is the purpose of this recipe is to show you how quickly the hostname can be changed with the intention to revise and resolve the resulting fully qualified domain name.
Getting ready
To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.
How to do it...
To begin this recipe we shall start by accessing the system as root and opening the following file in...