Changing of Hostname in Solaris10 & 11

For changing hostname in Solaris 10
you need to make changes in below files and reboot server. 
/etc/hosts
/etc/nodename
/etc/hostname.e1000g0
/var/crash/
# cd /var/crash
# mv old-host-name new-host-name

# reboot
For changing hostname in Solaris 11
List current configuration:
# svccfg -s system/identity:node listprop config
config                       application
config/enable_mapping       boolean     true
config/ignore_dhcp_hostname boolean     false
config/loopback             astring
config/nodename             astring     test.example.com
Change hostname to require one:
# svccfg -s system/identity:node setprop config/nodename="new-test.example.com"
Refresh and restart the system/identity:node service for the 
changes to take effect.
# svcadm refresh system/identity:node
# svcadm restart system/identity:node
Verify the changed configuration now:
# svccfg -s system/identity:node listprop config
config                       application
config/enable_mapping       boolean     true
config/ignore_dhcp_hostname boolean     false
config/loopback             astring
config/nodename             astring     new-test.example.com

Leave a Reply

Your email address will not be published. Required fields are marked *