1833802 Members
2427 Online
110063 Solutions
New Discussion

Changing Host Name

 

Changing Host Name

What is the bet and easy ( if there is one) way to change the host name of a production, HP server running HPUX 11.0? Changing host name on a production serve is advisable? And what are the issues I need to be aware of, before I change the host name. I really appreciate some help in this matter.

Thanks
no personal quote
12 REPLIES 12
Ken Hubnik_2
Honored Contributor

Re: Changing Host Name

Running set_parms is the best way to change.

set_parms hostname

If using DNS just make sure that the change is made on the DNS server.
Robert-Jan Goossens
Honored Contributor

Re: Changing Host Name

Hi,

# /sbin/set_parms hostname

Kind regards,

Robert-Jan.
James R. Ferguson
Acclaimed Contributor

Re: Changing Host Name

Hi:

# /sbin/set_parms hostname

...is probably the easiest, safest way. You will be prompted to provide information as needed.

Beware of any third-party products whose licensing may involve reference to the old hostname.

Remember to change any DNS servers' entries which reference your old name.

Regards!

...JRF...
Paul Sperry
Honored Contributor

Re: Changing Host Name

Also be aware of any exported nfs file systems.
you will have to edit the /etc/fstab on all of
the systems that have any mount points on the server.
John Bolene
Honored Contributor

Re: Changing Host Name

Either use SAM or
# /sbin/set_parms hostname


remember to get any DNS entries changed also if you are using DNS.

DNS can take a few hours to propagate.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Steven E. Protter
Exalted Contributor

Re: Changing Host Name

/etc/rc.config.d/netconf

Hostname is actually set there and can be changed with vi.

Caveat: It can't be longer than 8 characters, the OS won't like it. Include all previous warnings.

fully qualified domain names are possible, such as server.your.net

Don't back up the netconf file in the same directory it resides. Make a copy prior to editing in /root/ or whatever you have set roots home to.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
S.K. Chan
Honored Contributor

Re: Changing Host Name

In addition .. 2 more methods ..
1- Edit /etc/rc.config.d/netconf and reboot.
2- Use SAM :- Networking&Communication->NW Services and goto "action- modify system name".
As long as you understand how the clients references your server, changing of the server hostname should not be a big problem. For example if there's a automount map that the client uses then the entry in it needs to be updated. If hard mounts then mount table on clinets (/etc/fstab) need to be modified. And so on...
KCS_1
Respected Contributor

Re: Changing Host Name

hello~

1.

# set_parms hostname
(it's most easy way to change the hostname)


2.

edit hostname filed of /etc/rc.config.d/netconf
and /etc/hosts.

and then,

#/sbin/init.d/hostname start

good luck!





Easy going at all.
Jeff Schussele
Honored Contributor

Re: Changing Host Name

HI Raghuram,

The safest way to do this in Production is to add the new name to DNS as an alias a day or two before the actual system name change. This insures the new name is in DNS ahead of time.
Then the name change can be made in production, and when all other systems & apps that interact w/this system are verified OK w/the new name then the old name can be dropped in DNS.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sritharan
Valued Contributor

Re: Changing Host Name

Hi,


You can use the command
set_parms hostname

you can also use SAM

The things to consider is you have to edit the DNS files if you are using it, and if you have other nodes accessing you have to edit their /etc/hosts files and if you have .rhosts edit this also.


Thanks & Regards
SRi
Known is a drop...unknown is an ocean -> quote from a movie
Trond Haugen
Honored Contributor

Re: Changing Host Name

Enough said about how to do it I guess.
Carefully considder who are using the hostname (login, databases, print spoolers, NFS,...)
If you are using DNS considder setting up the old hostname as an alias and when to stop using it.
When finally removing the old hostname be prepared that someone will cry out loud. :-)

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Colin Topliss
Esteemed Contributor

Re: Changing Host Name

Don't forget to tell your user-base and your Windoze support team - they'll need to update whatever namesevices they are running (WINS for example).

I bet you anything that a few users will have added the server to their local host file - be prepared for them to call and complain.