N SPACE

Thinking,Technology&Life Recording...
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

solaris10 网络配置

Posted on 2008-12-02 15:38  Huntercat  阅读(356)  评论(0编辑  收藏  举报

安装完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

到此结束。

现在,您就可以体验Solaris上网的乐趣了。