1827459 Members
3927 Online
109965 Solutions
New Discussion

Re: Hostname changing

 
Prasanth Thomas
Valued Contributor

Hostname changing

Hi All

I need to change my server hostname without restart....becos its production server....
5 REPLIES 5
Ivan Krastev
Honored Contributor

Re: Hostname changing

Steven E. Protter
Exalted Contributor

Re: Hostname changing


Shalom,

change hostname in /etc/rc.config.d/netconf

Then stop and start the net service /sbin/init.d/net

You might find services like NFS are disrupted and you are better off scheduling a boot.

Do not forget to change self resolution entries in /etc/hosts

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
Fabien GUTIERREZ
Frequent Advisor

Re: Hostname changing

you can change hostname via hostname command or using set_parms but to be able to use the new name for all your applications and services you MUST restart the server
Avinash20
Honored Contributor

Re: Hostname changing

To change the hostname you could use
# hostname

Edit /etc/rc.config.d/netconf

Change the NODENAME

>> The best way is to use

# set_parms hostname

>> As told above, this might the application communication in case application communicate via hostname and not IP address
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: Hostname changing

To change the hostname you could use
# hostname

Edit /etc/rc.config.d/netconf

Change the NODENAME, HOSTNAME

Edit /etc/hosts, make neccesary changes.

>> The best way is to use

# set_parms hostname
and
edit /etc/hosts file
>> As told above, this might the application communication in case application communicate via hostname and not IP address
"Light travels faster than sound. That's why some people appear bright until you hear them speak."