DNS主从同步
DNS主服务器的配置
- yum install bind -y
- vim /etc/named.conf
- // listen-on port 53 { 127.0.0.1; };
- // allow-query { localhost; };
- allow-transfer { 192.168.209.10;};
- vim /etc/named.rfc1912.zones
- zone "xuepeng.com" in {
type master;
file "xuepeng.com.zone";
};
- cd /var/named/
- cp -p named.localhost xuepeng.com.zone
- vim xuepeng.com.zone

- systemctl start named
DNS 从服务器的配置
- yum install bind -y
- vim /etc/named.conf
- // listen-on port 53 { 127.0.0.1; };
// allow-query { localhost; };
allow-transfer { none; };
- vim /etc/named.rfc1912.zones
- zone "xuepeng.com" in {
type slave;
masters { 192.168.209.6; };
file "slaves/xuepeng.com.slave.zone";
};
- service named start

DNS 客户端测试
[root@centos6 ~]# host ftp.xuepeng.com 192.168.209.10
Using domain server:
Name: 192.168.209.10
Address: 192.168.209.10#53
Aliases: 数据库
ftp.xuepeng.com has address 1.1.1.1vim
改变 主 DNS 服务器的 数据库记录,增长版本号,看从DNS服务器的变化centos