[root@linuxprobe ~]# yum install bind-chroot
Loaded plugins: langpacks, product-id, subscription-manager
………………省略部分输出信息………………
Installing:
bind-chroot x86_64 32:9.9.4-14.el7 rhel 81 k
Installing for dependencies:
bind x86_64 32:9.9.4-14.el7 rhel 1.8 M
Transaction Summary

Install 1 Package (+1 Dependent package)
Total download size: 1.8 M
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:

Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 32:bind-9.9.4-14.el7.x86_64 1/2
Installing : 32:bind-chroot-9.9.4-14.el7.x86_64 2/2
Verifying : 32:bind-9.9.4-14.el7.x86_64 1/2
Verifying : 32:bind-chroot-9.9.4-14.el7.x86_64 2/2
Installed:
bind-chroot.x86_64 32:9.9.4-14.el7
Dependency Installed:
bind.x86_64 32:9.9.4-14.el7

在Linux系统中,bind服务程序的名称为named。首先需要在/etc目录中找到该服务程序的主配置文件,然后把第11行和第17行的地址均修改为any,分别表示服务器上的所有IP地址均可提供DNS域名解析服务,以及允许所有人对本服务器发送DNS查询请求。这两个地方一定要修改准确。
[root@linuxprobe ~]# vim /etc/named.conf
1 //
2 // named.conf
3 //
4 // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
5 // server as a caching only nameserver (as a localhost DNS resolver only).
6 //
7 // See /usr/share/doc/bind*/sample/ for example named configuration files.
8 //
9
10 options {
11 listen-on port 53 { any; };
12 listen-on-v6 port 53 { ::1; };
13 directory "/var/named";
14 dump-file "/var/named/data/cache_dump.db";
15 statistics-file "/var/named/data/named_stats.txt";
16 memstatistics-file "/var/named/data/named_mem_stats.txt";
17 allow-query { any; };