商讯信箱
用户名: @
密  码:   注册|忘记密码
登录
个人用户经销商
信箱 E杂志
您的位置:首页 > 服务器专区 > 正文       

(2)和DNS配置相关的文件

包括:/etc/defaultdomain、/etc/nsswitch.conf、/etc/resolv.conf 三个文件权限只需root可读即可。

1) /etc/defaultdomain

 "/etc/defaultdomain"文件给出确省域名,该文件内容为域名名称,例如:
--------------------------------  
nanjing.org.cn
---------------------------------
 
表示缺省域名为" nanjing.org.cn ",以后仅使用某个主机名时,系统假设为缺省域中的主机。例如,"ping www"将被理解为"ping www.nanjing.org.cn "。

2) /etc/nsswitch.conf

    如果使用DNS,则必须在该文件的"HOST"一项中给出"DNS"。缺省为使用文件,即"FILES",该选项可以保留。
-------------------------------------------------------- 
# /etc/nsswitch.files:
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd:     files
group:      files
hosts:      files   dns
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files 
bootparams: files
publickey:  files
# At present there isn't a 'files' backend for netgroup;  the system will
#   figure it out pretty quickly, and won't use netgroups at all.
netgroup:   files
automount:  files
aliases:    files
services:   files
sendmailvars:   files
--------------------------------------------------------
hosts: files dns 表示:将使用/etc/inet/hosts文件解析主机,如果无法解析主机名将使用DNS。

3) /etc/resolv.conf

    该文件给出域名和域名服务器地址。
----------------------------------------------------
; /etc/resolv.conf file
domain nanjing.org.cn ;域名
nameserver 61.155.107.131 ;域名服务器地址
;域名服务器地址可以给出多个
-----------------------------------------------------

1 2 3 4
有问必答
【内容导航】
第1页:Dns简介 第2页:DNS服务器创建
第3页:几个必须的配置文件 第4页:和DNS配置相关的文件
©版权所有。未经许可,不得转载。
[责任编辑:杨晓勇] [我要挑错]
相关产品
本文相关产品
   没有相关产品