狼爱上狸

我胡汉三又回来了

Solaris10无法上网

/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/

posted on 2009-12-31 10:48 狼爱上狸 阅读(529) 评论(0)  编辑  收藏 所属分类: SOLARIS


只有注册用户登录后才能发表评论。


网站导航: