Search This Blog

Tuesday, July 5, 2011

Steps to change the hostname on HP-UX:



1.    First run the hostname command to HP-UX server to change the hostname on HP-UX 11i server:

root@hpuxdev:/> hostname hpuxdev11

I am changing hostname on Integrity Itanium rx6600 running HP-UX 11iv2 from hpuxdev to hpuxdev11

2.    Next execute uname command to set the nodename like hostname:

root@hpuxdev:/> uname –S hpuxdev11

Running uname with –S option changes the nodename to required hostname value on HP-UX 11i server
3.    Change network configuration file (netconf) to make the change permanent during reboots. The netconf files exists under /etc/rc.config.d directory on HP-UX servers:
root@hpuxdev:/> cd /etc/rc.config.d/netconf

Open the netconf file using vi editor and search for HOSTNAME variable, replace the old hostname value to new hostname value. It is recommended by HP to keep the value enclosed in double quotes (" ")
root@nedunix6:/etc/rc.config.d> vi netconf
HOSTNAME="hpuxdev"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

After changing the HOSTNAME , the netconf file portion with HOSTNAME directives looks like this :

root@nedunix6:/etc/rc.config.d> vi netconf
HOSTNAME="hpuxdev11"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

5.Restart the network configuration settings on HP-UX server by running following command .Make sure you run these command from the CONSOLE or MP (Management processor) , sometimes we have noticed network timeout for few seconds while restarting network settings :

root@hpuxdev:/> /sbin/init.d/net start

Verify changes hostname on HP-UX:

Finally run following commands to make sure hostname and nodename is changed to newer name:

root@hpuxdev:/> hostname
hpuxdev11
root@hpuxdev:/> nodename
hpuxdev11

No comments:

Post a Comment