缓存dns解析服务器

[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 ~]# cat /etc/resolv.conf    //设置服务器
nameserver 192.168.200.111
nameserver 202.106.0.20
[root@localhost ~]# cat /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;
 dnssec-enable yes;
 dnssec-validation yes;
};
zone "." IN {
 type hint;
 file "named.ca"; };
[root@localhost ~]# named-checkconf /etc/named.conf
[root@localhost ~]#

猜你喜欢

转载自www.cnblogs.com/CAPF/p/11412531.html