To change the hostname on a Solaris system:
1. Change the hostname in /etc/nodename. Replace the information in this file; commenting out the previous value will cause problems during a reboot.
2. Run uname -S new_hostname to change the nodename and hostname for your current session.
3. Change the hostname in /etc/hostname.network_interface (e.g., /etc/hostname.hme0). Replace the information in this file; commenting out the previous value will cause problems during a reboot.
4. Change the hostname in /etc/hosts
5. Change the hostname in /etc/net/*/hosts (/etc/net/ticlts/hosts, /etc/net/ticots/hosts, /etc/net/ticotsord/hosts), if applicable.
Code:
# for FILE in `find /etc/net -name hosts` ; do
> fgrep -l old_hostname $FILE > /dev/null 2>&1 && sed 's/old_hostname/new_hostname/g' $FILE > $FILE.new && mv $FILE.new $FILE
> done
6. Change the savecore-dir
Code:
# [ ! -d /var/crash/`uname -n` ] && mkdir /var/crash/`uname -n` && chmod 700 /var/crash/`uname -n`
# dumpadm -s /var/crash/`uname -n`
7. Change the hostname in /etc/inet/ipnodes.
Source:brandonhutchinson
Bookmarks