BIND错误 – 加载configuration:意外的input结束

这是执行/etc/init.d/bind9 restart时所得到的错误

Jun 1 10:43:29 local-dns named[2922]: starting BIND 9.5.1-P1 -u bind Jun 1 10:43:29 local-dns named[2922]: found 1 CPU, using 1 worker thread Jun 1 10:43:29 local-dns named[2922]: using up to 4096 sockets Jun 1 10:43:29 local-dns named[2922]: loading configuration from '/etc/bind/named.conf' Jun 1 10:43:29 local-dns named[2922]: /etc/bind/named.conf.local:13: unexpected end of input Jun 1 10:43:29 local-dns named[2922]: loading configuration: unexpected end of input Jun 1 10:43:29 local-dns named[2922]: exiting (due to fatal error) 

这是我的/etc/bind/named.conf.local

 $TTL 86400 @ IN SOA ns1.test.com. ( 2006020201 604800 86400 2419200 604800 ) NS ns1 MX 10 mail 

无论我做什么,我似乎都无法得到意想不到的input错误结束。 MXlogging后,我已经尝试了一条线,MX是最后一行。 我不知道为什么它给这个错误。 有人知道吗?

named.conf.local是您定义您授权的区域(域)的地方。 你不应该把你的DNSlogging放在这里。

你的named.conf.local应该像这样。

 zone "test.com" { type master; file "/etc/bind/test.com.dns"; allow-query {any;}; }; 

所有你现在在那里的东西应该在一个名为/etc/bind/test.com.dns的文件中。

如果我可以添加一些东西,请再次检查绑定的文档,因为以下不是一个完整的条目:

 NS ns1