Wednesday, June 3, 2009

Changing the hostname on CentOS

Step 1: Edit on /etc/sysconfig/network
# vim /etc/sysconfig/network
Change
HOSTNAME=myserver.name.com

Step 2: Edit /etc/hostname
# vim /etc/hostname
Change
myserver.name.com 

Step 3: Run hostname
# hostname -F /etc/hostname

No comments: