In order to permanently set hostname on Centos 6 VPS you neew to run

# nano /etc/sysconfig/network

and set HOSTNAME=yourdomain.com
save and exit

You will have to reboot your VPS/server to see the changes take place
Was this answer helpful? 101 Users Found This Useful (114 Votes)