Wednesday, January 27, 2010

Changing hostname on RHEL

Changing hostname on RHEL:

1. Change the HOSTNAME line in /etc/sysconfig/network

2. Change the hostname (FQDN and alias) in /etc/hosts

3. Run /bin/hostname new_hostname for the hostname change to take effect immediately.

4. Run /sbin/service syslog restart for syslog to log using the new hostname.

A reboot is not required to change the system hostname.