- [[email protected] ~]# yum -y install bind // 安装 dns 服务
- [[email protected] ~]# 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
- [[email protected] ~]# cat /etc/resolv.conf // 设置服务器
- nameserver 192.168.200.111
- nameserver 202.106.0.20
- [[email protected] ~]# 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";
- };
- [[email protected] ~]# named-checkconf /etc/named.conf
- [[email protected] ~]#
来源: http://www.bubuko.com/infodetail-3170814.html