bind9 centos 安装

1、安装
yum –y install bind bind-utils bind-libs bind-chroot
2、开机启动
chkconfig named on
关闭防火墙
chkconfig iptables off
3、配置
/etc/named.conf

4、管控rndc
配置rndc.conf
命令:rndc-confgen > /etc/bind/rndc.conf
自动生成rndc.conf,内容如下:
# Start of rndc.conf
key "rndc-key" {
    algorithm hmac-md5;
    secret "oYV+NSAXam5nY1xa++tElQ==";
};

options {
    default-key "rndc-key";
    default-server 127.0.0.1;
    default-port 953;
};
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
#     algorithm hmac-md5;
#     secret "oYV+NSAXam5nY1xa++tElQ==";
# };
#
# controls {
#     inet 127.0.0.1 port 953
#         allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
这个文件里面有两段,把上面蓝色那段保留,把绿色那段剪切到named.caching-nameserver.conf文件的最下边
这个命令生成的东西每台机器都不一样,莫来抄我的,艹老也没用,原则,懂吗

(3)重新启动named
#/etc/init.d/named restart

ulimit -n 65535

猜你喜欢

转载自mthxunlei.iteye.com/blog/1982206
今日推荐