Chinaunix首页 | 论坛 | 博客
  • 博客访问: 152891
  • 博文数量: 42
  • 博客积分: 852
  • 博客等级: 准尉
  • 技术积分: 430
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-10 09:59
文章分类

全部博文(42)

文章存档

2015年(2)

2013年(9)

2012年(21)

2011年(4)

2009年(6)

我的朋友

分类: 系统运维

2012-10-26 11:30:15

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.

 
阅读(2644) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~