Monday, February 22, 2010

change host name without reboot - redhat

1, update hosts

vim /etc/hosts


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       revolutionNew   localhost.localdomain localhost

2, update network

 cd /etc/sysconfig/
 vim network


NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=revolutionNew

3, run 

hostname revolutionNew

4, run
 hostname

5, restart network
  /etc/init.d/network restart

6, disconnect ssh and relogin

No comments:

Post a Comment