Changing the Hostname (RedHat)
RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit
So in order to preserve your change on system reboot edit this file and enter the appropriate name using the HOSTNAME variable.
To temporarily change the hostname on a RHEL server (changes will revert back to what is in /etc/sysconfig/network after reboot):