我正在使用Debian10。我安装了bind9:
sudo apt-get install bind9 bind9utils dnsutils
I prepared my own conf file (in path /home/student/dns/myconf.conf
):
options {
directory "/var/named";
listen-on port 53 {127.0.0.1;};
transfer-source 127.0.0.1;
};
include "/etc/bind/rndc.key";
controls{
inet 127.0.0.1 port 953 allow {127.0.0.1;}
keys{rndc-key;};
};
检查了它:
sudo /etc/init.d/bind9 stop
sudo rndc-confgen -a -u bind -t /home/student/dns
然后尝试运行它:
sudo /usr/sbin/named -u bind -t /home/student/dns
但是,当我这样做时,我想检查它是否有效:
sudo ps aux | grep named
But it showed NOTHING. When I do sudo service bind9 status
it is activated. What's wrong? Should I use chroot or something? Why this does not work?