Hostname Change

In doing RAC Workshop, we use VMware to create a server named “rac1″ and then copy all the files as to another server “rac2″. The two servers are the same just after the copy process, including all the IP setting and hostname. We need to change the 2nd server with different hostname.

Change the hostname on a running machine:

$hostname NEW_NAME

This is active right away and will remain like that until the system will be rebooted. You will most probably need to exit the current shell in order to see the change in your shell prompt.

Change the hostname permanently on Redhat based systems:

$vi /etc/sysconfig/network

edit the new Hostname in this file

Reference:

1. http://www.ducea.com/2006/08/07/how-to-change-the-hostname-of-a-linux-system/

Leave a Reply