systemctl restart named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
命令:named-checkconf -z /etc/named.conf
zone linuxprobe.com/IN: NS 'ns.linuxprobe.com.linuxprobe.com' has no address records (A or AAAA)
zone linuxprobe.com/IN: not loaded due to errors. // 没有指定A记录导致出错
在 /usr/lib/systemd/system/named.service 中定义了一行:
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ];
then /usr/sbin/named-checkconf -z "$NAMEDCONF";
else echo "Checking of zone files is disabled"; fi'
就是因为启动 named 前会检查 named-checkconf -z /etc/named.conf ,回应 exit 1,所以启动失败
解决方式
1. 直接用 named -u named 启动,如果要习惯 syst