I knew how to do this in Ubuntu but doesn’t see to be the same in CentOS.

Here are the steps

Login via the console or SSH in
Goto /etc/sysconfig/
Type nano network
Change the HOSTNAME to your preferred servername
Press CTRL X > Y > Enter
Log off or reboot

There may be other methods, this one is mine