Hostname is usually set when installing the machine, but sometime you need to change it.
To print current set hostname
To temporarily change the hostname.
$ hostname server99.example.com
To permanently change the hostname, edit the /etc/sysconfig/network and set the HOSTNAME property.
After saving the configuration, you will need to reboot your machine.