/etc/defaultrouter中配網關
/etc/resolv.conf中配DNS
nameserver 202.XX.XX.XX
/etc/nsswitch.conf中hosts條中的file后加寫dns
安裝完solaris后,默認是不能上網的,需要修改如下四個文件:
1. /etc/hosts or /etc/inet/hosts
2. /etc/resolv.conf 默認是沒有的,需要手工添加
3. /etc/nsswitch.conf這個修改一下就ok
4. /etc/defaultrouter默認也是沒有的,手工添加
詳細如下:
1.編輯/etc/hosts文件,用過linux的朋友明白這步是什么意思的,只不過/etc/hosts文件是/etc/inet/hosts文件的一個軟鏈接,如下所示:
#cd /etc
#ls -l hosts
lrwxrwxrwx 1 root root 12 Jan 6 17:12 hosts -> ./inet/hosts
#cd /etc/inet
#ls -l hosts
-r--r--r-- 1 root sys 107 Jan 6 19:56 hosts
2.創建resolv.conf文件,加入dns服務器地址:
#vi /etc/resolv.conf
nameserver 202.101.172.48
nameserver 202.101.172.46
3.修改/etc/nsswitch.conf,只修改如下行:
hosts: files dns
4.創建/etc/defaultrouter文件,加入網關地址:
#vi /etc/defaultrouter
192.168.1.1
來自:http://limingchengwu.blog.163.com/blog/static/126785777200972841953324/