Change hostname for RHEL6

Change hostname for RHEL6

Change the HOSTNAME in /etc/sysconfig/network

cd /etc/sysconfig
vi network

HOSTNAME=eda001
Add one line in /etc/hosts

vi /etc/hosts

127.0.0.1 eda001
Use hostname command to set hostname
And finally restart netwark to apply the change

hostname eda001
service network restart

Change the HOSTNAME in /etc/sysconfig/network HOSTNAME= […]