Please note, for future reference, that there is no need to reinstall the entire operating system just to change the hostname. The hostname can be changed on an existing installation of the operating system. To do so, run the following command from the shell:

Code:

# hostname mynewhostname.mydomain.tld

Replace mynewhostname.mydomain.tld with the actual new hostname. Next, edit the files /etc/hosts and /etc/sysconfig/network, and replace the old hostname with the new one. You should not need to reboot the server, but you should restart services such as Apache and Exim to make sure they know about the new hostname.

If cPanel is running and accessible, instead of running the hostname command, click Main >> Networking Setup >> Change Hostname in the WebHost Manager. Then, verify from the shell that the /etc/hosts and /etc/sysconfig/network files contain the correct new hostname.