1. DNS configuration on zzsrv2 1.1. Install bind
Same as the primary DNS configuration on zzsrv1.
1.2. Configure 1.2.1. cache only Server
Same as the primary DNS configuration on zzsrv1.
1.2.2. Add a secondary Zone
# Vi/etc/named. add the following zone information "bigcloud. local "in {type slave; Masters {192.168.188.11 ;}; file" bigcloud. local. zone ";}; zone" 188.168.192.in-ADDR. ARPA "in {type slave; Masters {192.168.188.11 ;}; file" 192.168.188.zone ";}; zone" 189.168.192.in-ADDR. ARPA "in {type slave; Masters {192.168.188.11 ;}; file" 192.168.189.zone ";};
Modify Directory Permissions
[[email protected] named]# ll /var/named/ -ddrwxr-x--- 6 root named 133 Aug 11 14:06 /var/named/[[email protected] named]# chmod g+w /var/named/[[email protected] named]# ll /var/named/ -ddrwxrwx--- 6 root named 133 Aug 11 14:06 /var/named/
Start the service
[[email protected] ~]# systemctl start named.serviceRedirecting to /bin/systemctl restart named.service
Set to auto start
[[email protected] ~]# systemctl enable namedln -s ‘/usr/lib/systemd/system/named.service‘ ‘/etc/systemd/system/multi-user.target.wants/named.service‘
View logs and check for any error information. (We recommend that you enable this function when starting another session)
# tail -f /var/log/messages
1.3. Test bind
Generate the corresponding zone file on zzsrv1
[[Email protected] ~] # Ll/var/named/total 28-rw-r -- r -- 1 named 451 Aug 11 192.168.188.zone-RW-r -- 1 named 254 Aug 11 192.168.189.zone-RW-r -- r -- 1 named 647 Aug 11 bigcloud. local. zonedrwxr-x --- 7 root named 56 Aug 11 06 chrootdrwxrwx --- 2 named 22 Aug 11 19 datadrwxrwx --- 2 named 58 Aug 11 dynamic-RW-r ----- 1 root named 2076 Jan 28 2013 named. ca-RW-r ----- 1 Root named 152 Dec 15 2009 named. empty-RW-r ----- 1 root named 152 Jun 21 2007 named. localhost-RW-r ----- 1 root named 168 Dec 15 2009 named. loopbackdrwxrwx --- 2 named 6 Jun 10 16:13 slaves [[email protected] ~] # Vi/var/named/bigcloud. Local. Zone Add a test in a 10.0.0.1 record and increase the serial number of the zone [[email protected] ~] # Rndc reloadserver reload successful the log of zzsrv1 will see Zone bigcloud. local/In: sending notifies rial 11) Client 192.168.188.12 #41658 (bigcloud. loc: transfer of 'bigcloud. local/In ': axfr-style ixfr startedclient 192.168.188.12 #41658 (bigcloud. loc: transfer of 'bigcloud. local/In ': axfr-style ixfr ended in the log of zzsrv2, the client 192.168.188.11 #33856: Encrypted Ed used y for zone 'bigcloud. local 'zone bigcloud. local/In: Transfer started. transfer of 'bigcloud. local/In 'from 192.168.188.11 #53: connected using 192.168.188.12 #41658 zone bigcloud. local/In: Transferred serial 11 Transfer of 'bigcloud. local/In 'from 192.168.188.11 #53: transfer completed: 1 messages, 13 records, 339 bytes, 0.005 secs (67800 Bytes/sec) Zone bigcloud. local/In: sending notifies (Serial 11) # NSLookup> server 192.168.188.12default server: 192.168.188.12address: 192.168.188.12 #53> test. bigcloud. local. server: 192.168.188.12address: 192.168.188.12 #53 name: test. bigcloud. localaddress: 10.0.0.1> exit
This article from the "Liu Qiong @ Tiandao reward diligence" blog, please be sure to keep this source http://lqiong.blog.51cto.com/8170814/1559061
Centos project instance 3 (II) -- DNS configuration on zzsrv2