系统环境:
CentOS release 6.6 (Final)
Linux 2.6.32-504.el6.x86_64
DNS主:192.168.10.251(windows)
DNS从:192.168.10.250(linux)
安装bind服务
# yum install bind-libs bind-utils bind
编辑配置文件:
# vim /etc/named.conf
options {
listen-on port 53 { 127.0.0.1;192.168.10.251; };
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
# allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";
# managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
#include "/etc/named.root.key";
在从服务器添加需要同步的zone
在/etc/named.rfc1912.zones文件后面添加如下配置
zone "hepaidai.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/hepaidai.org.zone";
};
zone "langbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/langbank.org.zone";
};
zone "longbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/longbank.org.zone";
};
zone "zhijiaoyi.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/zhijiaoyi.org.zone";
};
启用DNS主服务器(windos)每一个zone的区域传送
如下图所示
并对其他的zone进行相同的操作
重启dsn从服务器
# /etc/init.d/named restart