1. To list the current hostname (i.e. config/nodename property) :
# 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 geeklab
2. Change the hostname to geekserver by setting the property config/nodename to geekserver
# svccfg -s system/identity:node setprop config/nodename="geekserver"
3. Refresh and restart the system/identity:node service for the changes to take effect.
# svcadm refresh system/identity:node
# svcadm restart system/identity:node
4. Verify the changes
# svccfg -s system/identity:node listprop config config application config/enable_mapping boolean true config/ignore_dhcp_hostname boolean false config/nodename astring geekserver config/loopback astring geekserver
# hostname geekserver
Check hostname
# cat /etc/hosts # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Internet host table # ::1 localhost 127.0.0.1 localhost loghost 192.168.1.20 geekserver
No comments:
Post a Comment