[root@localhost ~]# yum -y install bind //安装dns服务
[root@localhost ~]# rpm -qa |grep ^bind //查看
bind-license-9.9.4-72.el7.noarch
bind-utils-9.9.4-72.el7.x86_64
bind-libs-lite-9.9.4-72.el7.x86_64
bind-libs-9.9.4-72.el7.x86_64
bind-9.9.4-72.el7.x86_64
[root@localhost ~]# rpm -qa |grep ^bind //查看
bind-license-9.9.4-72.el7.noarch
bind-utils-9.9.4-72.el7.x86_64
bind-libs-lite-9.9.4-72.el7.x86_64
bind-libs-9.9.4-72.el7.x86_64
bind-9.9.4-72.el7.x86_64
[root @ localhost ~] # cat /etc/resolv.conf // server provided
nameserver 192.168.200.111
nameserver 202.106.0.20
[the root @ localhost ~] # CAT // set the main configuration file /etc/named.conf
nameserver 192.168.200.111
nameserver 202.106.0.20
[the root @ localhost ~] # CAT // set the main configuration file /etc/named.conf
options {
listen-on port 53 { 192.168.200.111; };
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";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { any; };
forwarders { 202.106.0.20; };
recursion yes;
listen-on port 53 { 192.168.200.111; };
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";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { any; };
forwarders { 202.106.0.20; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-validation yes;
};
zone "." IN {
type hint;
file "named.ca"; };
[root@localhost ~]# named-checkconf /etc/named.conf
[root@localhost ~]#
type hint;
file "named.ca"; };
[root@localhost ~]# named-checkconf /etc/named.conf
[root@localhost ~]#