大家好,我在启动 systemctl named.service 时遇到了问题,
我试图安装 bind 并配置一切以使公共域名正常工作,但遇到了这个问题。
systemctl status named.service
我收到这个错误
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2016-05-07 07:08:12 EDT; 21min ago
Process: 29283 ExecStart=/usr/sbin/named -u named $OPTIONS (code=exited, status=1/FAILURE)
Process: 29280 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS)
Main PID: 1228 (code=exited, status=0/SUCCESS)
May 07 07:08:12 darksys.net named[29285]: command channel listening on 127.0.0.1#953
May 07 07:08:12 darksys.net named[29285]: command channel listening on ::1#953
May 07 07:08:12 darksys.net named[29285]: isc_stdio_open 'data/named.run' failed: permission denied
May 07 07:08:12 darksys.net named[29285]: configuring logging: permission denied
May 07 07:08:12 darksys.net named[29285]: loading configuration: permission denied
May 07 07:08:12 darksys.net named[29285]: exiting (due to fatal error)
May 07 07:08:12 darksys.net systemd[1]: named.service: control process exited, code=exited status=1
May 07 07:08:12 darksys.net systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
May 07 07:08:12 darksys.net systemd[1]: Unit named.service entered failed state.
May 07 07:08:12 darksys.net systemd[1]: named.service failed.
权限有问题吗?
还有 SELinux 状态
$ sestatus
SELinux status: disabled
答案1
我在 chroot 下创建了一个目录
cd /var/named
mkdir chroot/var/named/data
chown named:named chroot/var/named/data
在那之后
sudo systemctl start named.service
我检查了一下
systemctl status named.service
一切正常运行。