linux – Bind9 named.conf文件中的错误.绑定不会开始

我正在尝试在Ubuntu Server计算机上设置DNS服务器(10.04).我在named.conf.local中配置了一个条目来测试它,但是当我尝试重新启动bind9时,我收到以下错误
* Starting domain name service... bind9                                 [fail]

所以我检查了syslog的输出,这就是我得到的.

May 20 18:11:13 empression-server1 named[4700]: starting BIND 9.7.0-P1 -u bind
May 20 18:11:13 empression-server1 named[4700]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-MysqL=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
May 20 18:11:13 empression-server1 named[4700]: adjusted limit on open files from 1024 to 1048576
May 20 18:11:13 empression-server1 named[4700]: found 4 cpus,using 4 worker threads
May 20 18:11:13 empression-server1 named[4700]: using up to 4096 sockets
May 20 18:11:13 empression-server1 named[4700]: loading configuration from '/etc/bind/named.conf'
May 20 18:11:13 empression-server1 named[4700]: /etc/bind/named.conf:10: missing ';' before 'include'
May 20 18:11:13 empression-server1 named[4700]: loading configuration: failure
May 20 18:11:13 empression-server1 named[4700]: exiting (due to Fatal error)

所以它认为我在认的named.conf文件中有一个错误,这非常荒谬.我经历了它,并删除一个空白行只是为了它的地狱,但我不知道它是如何形成那里的错误.请注意,在此之前我确实在named.conf.local中有错误,但它在syslog中正确显示并修复了它,因此报告了正确的文件.这是named.conf的内容

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian,*BEFORE* you customize 
// this configuration file.
//
// If you are just adding zones,please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

解决方法

假设第10行是named.conf的最后一行,那么这个错误可能是由于named.conf.local中最后一个选项缺少分号引起的.

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...