this 2all

change hostname on CentOS
 

Edit network file:
vi /etc/sysconfig/network

Press insert on the keyboard and change the HOSTNAME to your preferred servername

Press ESC on the keybord
Type :wq!
Press Enter