Solaris 11 Change hostname and IP address

2715阅读 0评论2012-10-26 随风飘来
分类:系统运维

change hostname:
  210  svccfg -s system/identity:node setprop config/nodename = astring: xafs100
  212  man svccfg
  213  svccfg -s system/identity:node listprop config
  214  svccfg -s system/identity:node setprop config/loopback = astring: xafs100

 
Change IP address:
  164  ipadm create-ip net0
  165  man ipadm
  167  ipadm create-addr -T static -a local=172.17.1.100/24 net0/v4
 
 
 
The following infomation from :
 
Begin with the installation Begin with the installation

Solaris 11: changing the hostname

To change the hostname in Solaris 11, I followed this steps:

1 - To check the current environment properties:

root@solaris:~# svccfg -s system/identity:node listprop config
config                 application        
config/enable_mapping boolean     true
config/nodename       astring     solaris
config/loopback       astring     solaris

2 - Set the new hostname

root@solaris:~# svccfg -s system/identity:node setprop config/nodename="my-host-name"
root@solaris:~# svccfg -s system/identity:node setprop config/loopback="my-host-name"

3- Refresh the properties:

root@solaris:~# svccfg -s system/identity:node refresh
4 - Restart the service:
root@solaris:~# svcadm restart system/identity:node

5 - verify that the changes took place:

root@solaris:~# svccfg -s system/identity:node listprop config
config                 application        
config/enable_mapping boolean     true
config/nodename       astring     my-host-name
config/loopback       astring     my-host-name
root@solaris:~# hostname
my-host-name

The hostname in the prompt will appear the next time a shell is open.

 
上一篇:Change disks on X3650 M4 to another one
下一篇:Solaris 11 Change hostname and IP address