安裝Bind服務程序

[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; };

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章