Changing the hostname on CentOS 7 is pretty straight forward, issue the following at shell and replace HOSTNAME with the hostname you want to set.
hostnamectl set-hostname HOSTNAME
To verify that the new hostname is set issue the following:
hostnamectl