开源中文网

您的位置: 首页 > Linux应用 > Bind > 正文

Bind配置找不到zone配置文件问题

来源:  作者:

今天配置Bind老是不成功,后来从/var/log/message中找到以下信息,原来是bind找不到zone配置文件named.10.182.125和named.oraclecorp.com.这两个是我自定义的文件,放在 /var/named路径下。


Nov 19 15:21:42 gci5 named[4059]: command channel listening on 127.0.0.1#953
Nov 19 15:21:42 gci5 named[4059]: /etc/rndc.key:7: couldn't add command channel 127.0.0.1#953: address in use
Nov 19 15:21:42 gci5 named[4059]: zone 0.in-addr.arpa/IN: loaded serial 42
Nov 19 15:21:42 gci5 named[4059]: zone 125.182.10.in-addr.arpa/IN: loading master file named.10.182.125: file not
 found
Nov 19 15:21:42 gci5 named[4059]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Nov 19 15:21:42 gci5 named[4059]: zone 255.in-addr.arpa/IN: loaded serial 42
Nov 19 15:21:42 gci5 named[4059]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
 loaded serial 1997022700
Nov 19 15:21:42 gci5 named[4059]: zone oraclecorp.com/IN: loading master file named.oraclecorp.com: file not foun
d
Nov 19 15:21:42 gci5 named[4059]: zone localdomain/IN: loaded serial 42
Nov 19 15:21:42 gci5 named[4059]: zone localhost/IN: loaded serial 42
Nov 19 15:21:42 gci5 named[4059]: running
Nov 19 15:21:42 gci5 named: named startup succeeded
 
后来偶尔发现同一目录下的其他bind默认zone的配置文件,原来是个软连接。ls的输出如下:
 
ls -l /var/named
drwxr-x---  6 root  named 4096 Nov 16 08:21 chroot
drwxrwx---  2 named named 4096 Apr  4  2006 data
lrwxrwxrwx  1 root  root    44 Nov 14 13:49 localdomain.zone -> /var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx  1 root  root    42 Nov 14 13:49 localhost.zone -> /var/named/chroot/var/named/localhost.zone
lrwxrwxrwx  1 root  root    44 Nov 19 15:28 named.10.182.125
lrwxrwxrwx  1 root  root    43 Nov 14 13:49 named.broadcast -> /var/named/chroot/var/named/named.broadcast
lrwxrwxrwx  1 root  root    36 Nov 14 13:49 named.ca -> /var/named/chroot/var/named/named.ca
lrwxrwxrwx  1 root  root    43 Nov 14 13:49 named.ip6.local -> /var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx  1 root  root    39 Nov 14 13:49 named.local -> /var/named/chroot/var/named/named.local
lrwxrwxrwx  1 root  root    48 Nov 19 15:27 named.oraclecorp.com 
lrwxrwxrwx  1 root  root    38 Nov 14 13:49 named.zero -> /var/named/chroot/var/named/named.zero
drwxrwx---  2 named named 4096 Apr  4  2006 slaves
 
之后我把我的zone配置文件mv到/var/named/chroot/var/named/中,然后在/var/named目录做了个软链接,问题解决了。给遇到类似问题的同志们参考。

Tags:Bind 配置 找不到 zone
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明