Unbound是一个高性能、递归式的DNS服务器,它提供了DNS解析服务。配置文件unbound.conf包含了Unbound运行所需的各种设置和参数,比如监听地址、端口、缓存设置、日志记录等。在一台部署了该服务的主机系统重启后,有如下消息输出到/var/log/messages文件。
unbound-checkconf[XXX]: unbound-checkconf: no errors in /etc/unbound/unbound.conf
通过/usr/sbin/unbound-checkconf命令检查后未在/etc/unbound/unbound.conf文件中发现任何错误。
解决方案
编辑/usr/lib/systemd/system/unbound.service文件,按如下所示添加服务配置。
[root@yunweixia.com ~]# vi /usr/lib/systemd/system/unbound.service [Unit] Description=Unbound recursive Domain Name Server After=network.target After=unbound-keygen.service Wants=unbound-keygen.service Wants=unbound-anchor.timer Before=nss-lookup.target Wants=nss-lookup.target [Service] Type=simple EnvironmentFile=-/etc/sysconfig/unbound ExecStartPre=/usr/sbin/unbound-checkconf #<====== ...
原创文章,作者:运维侠,如若转载,请注明出处:https://www.yunweixia.com/solutions/unbound-checkconf-error-free-configuration-verification.html