6.配置DNS
1.root@solaris:~# svccfg -s dns/client
2.svc:/network/dns/client> setprop config/nameserver = (8.8.8.8 8.8.4.4)
3.svc:/network/dns/client> listprop config
4.config application
5.configalue_authorization astring solaris.smf.value.name-service.dns.client
6.config/nameserver net_address 8.8.8.8 8.8.4.4
7.svc:/network/dns/client> exit
8.root@solaris:~#
9.root@solaris:~# svcadm refresh dns/client
10.root@solaris:~# svcadm restart dns/client
7.配置name-server
1.root@solaris:~# svccfg -s name-service/switch
2.svc:/system/name-service/switch> setprop config/host = "files dns"
3.svc:/system/name-service/switch> listprop config
4.config application
5.config/default astring files
6.configalue_authorization astring solaris.smf.value.name-service.switch
7.config/printer astring "user files"
8.config/host astring "files dns"
1.root@solaris:~# svccfg -s dns/client
2.svc:/network/dns/client> setprop config/nameserver = (8.8.8.8 8.8.4.4)
3.svc:/network/dns/client> listprop config
4.config application
5.configalue_authorization astring solaris.smf.value.name-service.dns.client
6.config/nameserver net_address 8.8.8.8 8.8.4.4
7.svc:/network/dns/client> exit
8.root@solaris:~#
9.root@solaris:~# svcadm refresh dns/client
10.root@solaris:~# svcadm restart dns/client
7.配置name-server
1.root@solaris:~# svccfg -s name-service/switch
2.svc:/system/name-service/switch> setprop config/host = "files dns"
3.svc:/system/name-service/switch> listprop config
4.config application
5.config/default astring files
6.configalue_authorization astring solaris.smf.value.name-service.switch
7.config/printer astring "user files"
8.config/host astring "files dns"
9.svc:/system/name-service/switch> exit
Tips:
nsswitch 服务搜索顺序:http://www.360doc.com/content/11/0428/14/2614615_112927695.shtml