我运行时一直收到此错误named-checkzone example.com /var/named/example.com.zone
zone example.com/IN: NS 'ns.example.com' has no address records (A or AAAA)
zone example.com/IN: not loaded due to errors.
/etc/named.conf
options {
directory "/var/named";
};
zone "example.com" in {
type master;
file "/var/named/example.com.zone";
};
/var/named/example.com.zone
$TTL 1d
example.com. IN SOA ns.example.com. root.example.com. (
1 ; Serial
3600 ; Refresh
900 ; Update retry
2d ; Expire
3600 ; TTL
)
@ IN NS ns.example.com.
example.com. IN A 192.168.1.102
example.com. IN NS ns.example.com.
这是怎么回事?我不明白为什么我一直收到这个错误。
答案1
您正在将此区域的 NS 设置为 ns.example.com。
但您没有为 ns.example.com 创建 A 记录。
添加(当然要相应调整IP):
ns.example.com. IN A 192.168.1.102