Configure the primary DNS server dns from
the primary domain name server (install the package and turn off the firewall)
[root @ localhost ~] # CAT / etc / hosts /etc/resolv.conf // set the hosts and resolv.conf file /// ///
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.200.111 ns1.dou.com
192.168.200.112 ns2.dou.com
nameserver 192.168.200.111
nameserver 192.168.200.112
nameserver 202.106.0.20
===== modifying the master configuration file
[root @ localhost ~] # cat /etc/named.conf
the primary domain name server (install the package and turn off the firewall)
[root @ localhost ~] # CAT / etc / hosts /etc/resolv.conf // set the hosts and resolv.conf file /// ///
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.200.111 ns1.dou.com
192.168.200.112 ns2.dou.com
nameserver 192.168.200.111
nameserver 192.168.200.112
nameserver 202.106.0.20
===== modifying the master configuration file
[root @ localhost ~] # cat /etc/named.conf
options {
directory "/var/named";
directory "/var/named";
};
Zone "dou.com" {the IN
type Master;
File "dou.zheng";
the allow-Transfer {192.168.200.112;};
};
Zone "200.168.192.in-addr.arpa" {the IN
type Master;
File "Dou .fan ";
the allow-Transfer {192.168.200.112;};
};
[@ localhost the named the root] # CAT dou.zheng //// modified forward resolution file
$ 86400 the TTL
@ the IN dou.com mail.dou the SOA.. COM. (
20,190,826
1D
IH
1W
3H
)
the NS ns1.dou.com.
the NS ns2.dou.com.
NSl A 192.168.200.111
NS2 A 192.168.200.112
WWW A 192.168.200.113
[the named the root @ localhost] # CAT dou.fan / // modify reverse lookup file
The TTL 86400 $
@ the IN dou.com the SOA. Mail.dou.com. (
20,190,826
1D
IH
1W
3H
)
ns1.dou.com the NS.
The NS ns2.dou.com.
111 ns1.dou.com the PTR.
112 ns2.dou the PTR .com.
113 PTR www.dou.com.
[root @ localhost named] # systemctl Start named //// open service
======================= =======================
DNS server installation from the
replication master server configuration file to the unit
[root @ localhost ~] # scp 192.168.200.111:/etc /named.conf
the /etc/named.conf
[email protected]'s password:
100% 248 299.9KB the named.conf / S 00:00
[the root @ localhost ~] #
[the root @ localhost ~] # Vim /etc/named.conf
[the root @ localhost ~] // /etc/named.conf CAT # / modify the master configuration file
type Master;
File "dou.zheng";
the allow-Transfer {192.168.200.112;};
};
Zone "200.168.192.in-addr.arpa" {the IN
type Master;
File "Dou .fan ";
the allow-Transfer {192.168.200.112;};
};
[@ localhost the named the root] # CAT dou.zheng //// modified forward resolution file
$ 86400 the TTL
@ the IN dou.com mail.dou the SOA.. COM. (
20,190,826
1D
IH
1W
3H
)
the NS ns1.dou.com.
the NS ns2.dou.com.
NSl A 192.168.200.111
NS2 A 192.168.200.112
WWW A 192.168.200.113
[the named the root @ localhost] # CAT dou.fan / // modify reverse lookup file
The TTL 86400 $
@ the IN dou.com the SOA. Mail.dou.com. (
20,190,826
1D
IH
1W
3H
)
ns1.dou.com the NS.
The NS ns2.dou.com.
111 ns1.dou.com the PTR.
112 ns2.dou the PTR .com.
113 PTR www.dou.com.
[root @ localhost named] # systemctl Start named //// open service
======================= =======================
DNS server installation from the
replication master server configuration file to the unit
[root @ localhost ~] # scp 192.168.200.111:/etc /named.conf
the /etc/named.conf
[email protected]'s password:
100% 248 299.9KB the named.conf / S 00:00
[the root @ localhost ~] #
[the root @ localhost ~] # Vim /etc/named.conf
[the root @ localhost ~] // /etc/named.conf CAT # / modify the master configuration file
options {
directory "/var/named";
directory "/var/named";
};
zone "dou.com" IN {
type slave;
file "slaves/dou.zheng";
masters { 192.168.200.111; };
};
zone "200.168.192.in-addr.arpa" IN {
type slave ;
file "slave/dou.fan";
masters { 192.168.200.111; };
};
[root@localhost ~]# vim /etc/hosts //修改hosts文件
[root@localhost ~]# vim /etc/resolv.conf //修改resolv.conf文件
[root@localhost ~]# cat /etc/hosts /etc/resolv.conf
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.200.111 ns1.dou.com
192.168.200.112 ns2.dou.com
# Generated by NetworkManager
nameserver 192.168.200.111
nameserver 192.168.200.112
[root@localhost ~]# systemctl start named //开启
type slave;
file "slaves/dou.zheng";
masters { 192.168.200.111; };
};
zone "200.168.192.in-addr.arpa" IN {
type slave ;
file "slave/dou.fan";
masters { 192.168.200.111; };
};
[root@localhost ~]# vim /etc/hosts //修改hosts文件
[root@localhost ~]# vim /etc/resolv.conf //修改resolv.conf文件
[root@localhost ~]# cat /etc/hosts /etc/resolv.conf
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.200.111 ns1.dou.com
192.168.200.112 ns2.dou.com
# Generated by NetworkManager
nameserver 192.168.200.111
nameserver 192.168.200.112
[root@localhost ~]# systemctl start named //开启