For changing the Hostname of a CentOS Server follow steps below:
- Open the global network configuration file:
- Find the HOSTNAME setting. It’s default value will looks like below:
- Replace that localhost value with chosen fully qualified domain name.
- Save changes and exit and reboot the server for applying host name changes immediately