Changing your hostname on Solaris
From Docupedia
Date: 4/27/2007
Overview
The goal of this tutorial/doc is to guide you through changing the hostname of a given Solaris install so that it will properly function under the new name. It's not meant to be comprehensive--- it's meant to cover only those things needed by Solaris to properly identify itself.
Note that this means it does *not* include updating any references to the hostname in Nameservices/directories such as DNS, NIS, LDAP, etc. In a well fleshed-out network you'll probably need to make updates there as well.
Files to be edited
- /etc/hostname.<name of primary network interface>
- /etc/hosts
- /etc/inet/ipnodes (Solaris installs that support IPv6)
- /etc/nodename
- /etc/dumpadm.conf
- /etc/net/ticlts/hosts
- /etc/net/ticots/hosts
- /etc/net/ticotsord/hosts
Editing the files
This should probably be done in single-user mode, so that any services which try to resolve the hostname using local files won't disagree mid-stride.
Basically you can use the following lines for each file:
vi <filename> :%s/<old hostname>/<new hostname>/gc :wq!
That having been done, reboot the machine and watch for errors. Be sure to check the logs in /var/log and /var/adm/log for errors as well.
Sayotte 11:08, 27 April 2007 (EDT)
