我在Ubuntu12.04LTS上安装bind9有问题。我已经安装了Plesk 11服务器,但DNS服务没有运行。
root@cp11:~# apt-get install bind
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package bind is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
bind9 dnsutils dnsutils:i386 bind9:i386 manpages
E: Package 'bind' has no installation candidate
root@cp11:~#
root@cp11:~# /etc/init.d/bind9 start
* Starting domain name service... bind9 [fail]
root@cp11:~# /etc/init.d/bind9 restart
* Stopping domain name service... bind9 [ OK ]
* Starting domain name service... bind9 [fail] 当我试图检查日志文件时:
root@cp11:~# tail -f /var/log/messages
tail: cannot open `/var/log/messages' for reading: No such file or directory我签了/etc,这里有一个绑定目录
root@cp11:/etc/bind# ls
bind.keys db.127 db.empty db.root named.conf.default-zones named.conf.options rndc.key
db.0 db.255 db.local named.conf named.conf.local rndc.conf zones.rfc1918当我试图卸载bind9时,它也会移除Plesk控制面板。
因此,我更新和升级了包,并看到了绑定错误:
root@cp11:~# apt-get upgrade
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic
Processing triggers for resolvconf ...
Processing triggers for python-support ...
Errors were encountered while processing:
bind9
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2012-10-19 09:03:19
看来普列斯克与帕特摩尔有冲突,这就导致了绑定的问题。
因此,解决办法是:
sudo /etc/init.d/apparmor teardown
sudo update-rc.d -f apparmor remove 然后启动绑定sudo /etc.init.d/bind9 start
参考http://kb.parallels.com/en/112903
发布于 2013-07-25 05:14:40
Plesk和Apparmor有冲突(S),我只知道Apparmor的默认Bind9配置文件和Plesk的配置之间的冲突。官方文档说要卸载Apparmor,因为它不受支持,我认为这是不明智的,因为它放弃了一个合理数量的保护。
您只需调整bind9的Apparmor配置文件,编辑/etc/apparmor.d/local/usr.sbin.named并添加:
# Allow Plesks configuration for bind9 to run with Apparmor
/var/named/run-root/** rwm,然后重新加载Apparmor,并启动bind9:
# Reload Apparmor profiles
service apparmor reload
# Start bind9, which should start without error now
service bind9 start服务管理页面现在应该报告bind9正在运行,如果没有运行,您可能需要重新启动Plesk:
service psa restart来源:http://www.failover.co/blog/plesk-11-bind9-and-ubuntu-12-04-apparmor-problems (免责声明:我写的源代码,我不是一个安全专家。)
https://askubuntu.com/questions/189169
复制相似问题