首先说明一下环境:RedHat 7.0 Bind-8.2.2
申请的域名是: brierbird.dhs.org
设置DNS的目的:让bbs.brierbird.dhs.org, ftp.brierbird.dhs.org及其它*.brierbird.dhs.org能够起解析到正确到IP地址。
解包Bind-8.2.2-P5后,在src下make了,也make install了。同时利用bind-8.2.2_P5-9.i386.rpm,生成了/etc/rc.d/init.d/named
然后就是我对几个重要的配置文件配置,具体内容如下:
##################################################
# 1. /etc/named.conf
#################################################
options {
directory "/var/named";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "brierbird.dhs.org" {
type master;
file "brierbird.dhs.org";
};
###################################33
#2. /var/name/brierbird.dhs.org 估计可能有问题
######################################3
@ IN SOA ns.wenyuan.dhs.org. root.ns.wenyuan.dhs.org. (
2001122403 ;serial
3600 ; refresh
900 ; retry
864000 ; expire
3600 ; default_ttl
)
IN NS ns.wenyuan.dhs.org.
IN MX 10 wenyuan.dhs.org.
localhost IN A wenyuan.dhs.org.
ns IN A 166.111.107.23
www IN A 166.111.107.23
bbs IN A 166.111.107.23
ftp IN A 166.111.107.23
* IN A 166.111.107.23
##################################
# 3. /var/named/named.local
################################3
@ IN SOA localhost. root.localhost. (
2001122403 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
#################################
4. /etc/host.conf
################################
# 解析域名的顺序
order bind,hosts
#允许一台计算机拥有多个IP
multi on
#################################
5. /etc/hosts : 估计可能有问题
################################
127.0.0.1 localhost brierbird.dhs.org
166.111.107.23 brierbird.dhs.org brierbird
=====================================
另外的named.ca是用解压包自动生成,大家都说不用改动,我想问题不可能是出在这儿,所以就不贴出来了(有点长:20-30行样子)
然后呢,运行/etc/rc.d/init.d/named restart
结果是:
Shutting down named: [ OK ]
Starting named: [ OK ]
应该说,这样子应该是成功了,但ping bbs.brierbird.dhs.org却是失败的:ping: unknown host bbs.wenyuan.dhs.org
为此用ndc status看了一下,结果如下:
named 8.2.4-REL Mon Dec 24 11:45:08 CST 2001
root@localhost.localdomain:/home/yxm/setup/bind/src/bin/named
config (/etc/named.conf) last loaded at age: Mon Dec 24 15:36:08 2001
number of zones allocated: 64
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is initialising itself
看上面的样子,好像是正确的,可是就是不行。接着用nslookup了一下,结果如下:
[root@localhost src]# nslookup
Default Server: dns-a.tsinghua.edu.cn
Address: 166.111.8.28
这个是学校的DNS,倒也没错。
以上是我的设置和分析,总觉得是不是什么地方有点小问题,但就是查不出来,不知道哪位能帮忙看一下。我搞它都用了好几天了,看了一些文档说明,以及网友的经验,就是不成功:((
另外,我还怀疑会不会不是BIND本身的原因,当然只是怀疑。求教了。//bow