Having a test server environment is important for developers and support staff. We usually replicate production servers running RedHat Linux using rsync for creating test server environment. Avoiding conflicts when the test server are put live requires some basic changes. A primary thing to change is the hostname of the RedHat Linux test server. There are various ways to change the hostname or there are several locations where to change the RedHat Linux hostname.
First is to change the hostname without restarting the computer. This could be achieved using the hostname command as follows:
$sudo hostname newhost.domain.com
Second is to have the hostname stay even when the RedHat Linux server is rebooted. This could be done by editing hostname found in the system configuration network file as follows:
$sudo vi /etc/sysconfig/network
Lastly is to check and change the hosts file which sometimes contain old hostname. This could be done by editing the hosts file found under the “etc” folder as follows:
$sudo vi /etc/hosts
The above steps are the way I configure the RedHat Linux test server environment hostname. I find that conflicts can be avoided when hostnames are changed prior to plugging a test server to the working network.