我在使用 Bind 和 Cent OS(最新版本的 bind)时遇到了非常烦人的问题。
当我尝试启动它时:
Error in named configuration:
zone localdomain/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
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
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
/var/named/sites/x7-hosting.org.db:3: no current owner name
/var/named/sites/x7-hosting.org.db:4: no current owner name
/var/named/sites/x7-hosting.org.db:11: no current owner name
/var/named/sites/x7-hosting.org.db:12: no current owner name
/var/named/sites/x7-hosting.org.db:13: no current owner name
/var/named/sites/x7-hosting.org.db:14: no current owner name
/var/named/sites/x7-hosting.org.db:15: no current owner name
/var/named/sites/x7-hosting.org.db:16: no current owner name
/var/named/sites/x7-hosting.org.db:17: no current owner name
/var/named/sites/x7-hosting.org.db:18: no current owner name
/var/named/sites/x7-hosting.org.db:19: no current owner name
/var/named/sites/x7-hosting.org.db:20: no current owner name
/var/named/sites/x7-hosting.org.db:21: no current owner name
zone x7-hosting.org/IN: loading master file /var/named/sites/x7-hosting.org.db: no owner
_default/x7-hosting.org/IN: no owner
这是 myx7-hosting.org.db 文件:
$ORIGIN x7-hosting.org.
$TTL 14400
@ IN SOA ns1.x7-hosting.org. root.x7-hosting.org. (
2013010802 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
x7-hosting.org. 86400 IN NS ns1.x7-hosting.org.
x7-hosting.org. 86400 IN NS ns2.x7-hosting.org.
ns1.x7-hosting.org. 14400 IN A 91.193.75.81
ns2.x7-hosting.org. 14400 IN A 91.193.75.81
x7-hosting.org. 14400 IN A 91.193.75.81
localhost.x7-hosting.org. 14400 IN A 127.0.0.1
x7-hosting.org. 14400 IN MX 0 x7-hosting.org.
www 14400 IN CNAME x7-hosting.org.
ftp 14400 IN CNAME x7-hosting.org.
mail 14400 IN CNAME x7-hosting.org.
webmail 14400 IN CNAME x7-hosting.org.
这是我的named.conf
// MAINTAINED BY [LUKA PAUNOVIC]
// Began [10.02.2013]
include "/etc/rndc.key";
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndckey"; };
};
options {
allow-transfer { 127.0.0.1; };
allow-recursion { 91.193.75.81; };
directory "/var/named";
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "/var/named/named.ca";
};
zone "localdomain" IN {
type master;
file "/var/named/localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "/var/named/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "/var/named/named.local";
allow-update { none; };
};
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 {
type master;
file "/var/named/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "/var/named/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "/var/named/named.zero";
allow-update { none; };
};
// LOCAL ZONES /////////////////////////////////////////////////////////////////
// your websites and other named-servers will go below here.
zone "x7-hosting.org" {
type master;
file "/var/named/sites/x7-hosting.org.db";
};
答案1
删除文件前几行(至少)的前导空格。