Bind配置找不到zone配置文件

配置Bind后,测试不成功,后来从/var/log/messages中找到以下信息,
原来是bind找不到zone配置文件yahoo.com.zone,这个是我自定义的文件,放在 /var/named路径下。
Jul 17 17:25:45 localhost named[8008]: starting BIND 9.2.4 -u named -t /var/named/chroot
Jul 17 17:25:45 localhost named[8008]: using 1 CPU
Jul 17 17:25:45 localhost named[8008]: loading configuration from '/etc/named.conf'
Jul 17 17:25:45 localhost named[8008]: listening on IPv4 interface lo, 127.0.0.1#53
Jul 17 17:25:45 localhost named[8008]: listening on IPv4 interface eth0, 192.168.1.222#53
Jul 17 17:25:45 localhost named[8008]: command channel listening on 127.0.0.1#953
Jul 17 17:25:45 localhost named[8008]: zone 0.in-addr.arpa/IN: loaded serial 42
Jul 17 17:25:45 localhost named[8008]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Jul 17 17:25:45 localhost named[8008]: zone 255.in-addr.arpa/IN: loaded serial 42
Jul 17 17:25:45 localhost named[8008]: 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
Jul 17 17:25:45 localhost named[8008]: zone yahoo.com/IN: loading master file /var/named/yahoo.com.zone: file not found
Jul 17 17:25:45 localhost named[8008]: zone localdomain/IN: loaded serial 42
Jul 17 17:25:45 localhost named[8008]: zone localhost/IN: loaded serial 42
Jul 17 17:25:45 localhost named[8008]: running
Jul 17 17:25:45 localhost named: named startup succeeded
后来发现同一目录下的其他bind默认zone的配置文件,原来是个软连接。ls的输出如下:
ls -l /var/named
drwxr-x---  5 root  named 4096 Jul 17 16:14 chroot
drwxrwx---  2 named named 4096 Jan 31  2007 data
lrwxrwxrwx  1 root  root    44 Jul 17 16:14 localdomain.zone -> /var/named/chroot/var/named/localdomain.zone
lrwxrwxrwx  1 root  root    42 Jul 17 16:14 localhost.zone -> /var/named/chroot/var/named/localhost.zone
lrwxrwxrwx  1 root  root    43 Jul 17 16:14 named.broadcast -> /var/named/chroot/var/named/named.broadcast
lrwxrwxrwx  1 root  root    36 Jul 17 16:14 named.ca -> /var/named/chroot/var/named/named.ca
lrwxrwxrwx  1 root  root    43 Jul 17 16:14 named.ip6.local -> /var/named/chroot/var/named/named.ip6.local
lrwxrwxrwx  1 root  root    39 Jul 17 16:14 named.local -> /var/named/chroot/var/named/named.local
lrwxrwxrwx  1 root  root    38 Jul 17 16:14 named.zero -> /var/named/chroot/var/named/named.zero
drwxrwx---  2 named named 4096 Jan 31  2007 slaves
lrwxrwxrwx  1 root  root    40 Jul 17 17:15 yahoo.com.zone
之后我把我的zone配置文件mv到/var/named/chroot/var/named/中,然后在/var/named目录做了个软链接,问题解决了。

你可能感兴趣的:(职场,休闲)