这是我的转发区文件:
[root@m6 named]# cat ourlinuxtutorials.com.db $TTL 1D 86400 @ IN SOA m6.ourlinuxtutorials.com. root.m6.ourlinuxtutorials.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN NS m6.ourlinuxtutorials.com. IN A 127.0.0.1 m6 IN A 192.34.61.117
错误是由于:
<<< @ IN SOA m6.ourlinuxtutorials.com. root.m6.ourlinuxtutorials.com. (
这里m6.ourlinuxtutorials.com
是主机名。
所以行:
IN NS m6.ourlinuxtutorials.com.
应该是指m6.ourlinuxtutorials.com
是名称服务器,但它不是。 那一定是错误的?
当名字被重新启动时也有错误:
[root@m6 named]# service named restart Stopping named: [ OK ] Starting named: Error in named configuration: dns_master_load: ourlinuxtutorials.com.db:1: extra input text zone ourilinuxtutorials.com/IN: loading from master file ourlinuxtutorials.com.db failed: extra input text zone ourilinuxtutorials.com/IN: not loaded due to errors. _default/ourilinuxtutorials.com/IN: extra input text zone 61.34.192.in-addr.arpa/IN: loaded serial 0 zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.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 0 zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: loaded serial 0 [FAILED]
我认为这些线:
<<< @ IN SOA m6.ourlinuxtutorials.com. root.m6.ourlinuxtutorials.com. (
应该是这样的:
IN SOA m6.ourlinuxtutorials.com. root.ourlinuxtutorials.com. (
看看这个示例域主文件 。
$TTL 86400 ; 24 hours could have been written as 24h or 1d $ORIGIN example.com. @ 1D IN SOA ns1.example.com. hostmaster.example.com. ( 2002022401 ; serial 3H ; refresh 15 ; retry 1w ; expire 3h ; minimum ) IN NS ns1.example.com. ; in the domain IN NS ns2.smokeyjoe.com. ; external to domain IN MX 10 mail.another.com. ; external mail provider ; server host definitions ns1 IN A 192.168.0.1 ;name server definition www IN A 192.168.0.2 ;web server definition ftp IN CNAME www.example.com. ;ftp server definition ; non server domain hosts bill IN A 192.168.0.3 fred IN A 192.168.0.4
此外,它看起来像在第一行的错字:
我认为它应该是$TTL 1D
,而不是$TTL 1D 86400
。 这就是错误抱怨,行#1:
dns_master_load: ourlinuxtutorials.com.db:1: extra input text