FOSS Linux published a tutorial about changing the Hostname on CentOS.
How to Change the Hostname on CentOS
Changing the hostname of your CentOS PC is one of the routine tasks. Let's look at how to change the hostname on a local CentOS system or a remote machine connected over a network.
How to Change the Hostname on CentOS | FOSS Linux