Bind-01-安裝與簡介
阿新 • • 發佈:2021-01-11
Bind官網:https://www.isc.org/downloads/
Bind官方文件:http://ftp.isc.org/isc/bind9/9.11.0-P3/doc/arm/Bv9ARM.pdf
1,Bind是什麼:
Bind 是一個用於域名解析的軟體服務
2,Bind安裝:
1)原始碼安裝:
下載:bind-9.11.0-P3.tar.gz
執行下面命令:
cd /usr/local tar xzf bind-9.11.0-P3.tar.gz ./configure --prefix=/usr/local/named --enable-threads --enable-epoll --disable-openssl-version-check ./configure --help,#可以看到有很多的配置選項 make make install #為了命令方便 vim /etc/profile export PATH=${PATH}:/usr/local/named/bin:/usr/local/named/sbin
2) yum安裝:
yum list | grep ^bind #通過此命令可以看到很多關於bind的安裝包
[root@bogon yum.repos.d]# yum list | grep ^bind bind.x86_64 32:9.11.4-26.P2.el7_9.3 @updates bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.3 @updates bind-libs.x86_64 32:9.11.4-26.P2.el7_9.3 @updates bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.3 @updates bind-license.noarch 32:9.11.4-26.P2.el7_9.3@updates bind-chroot.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-devel.i686 32:9.11.4-26.P2.el7_9.3 updates bind-devel.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-dyndb-ldap.x86_64 11.1-7.el7 base bind-export-devel.i686 32:9.11.4-26.P2.el7_9.3 updates bind-export-devel.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-export-libs.i686 32:9.11.4-26.P2.el7_9.3 updates bind-libs.i686 32:9.11.4-26.P2.el7_9.3 updates bind-libs-lite.i686 32:9.11.4-26.P2.el7_9.3 updates bind-lite-devel.i686 32:9.11.4-26.P2.el7_9.3 updates bind-lite-devel.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11-devel.i686 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11-devel.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11-libs.i686 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11-libs.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-pkcs11-utils.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-sdb.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-sdb-chroot.x86_64 32:9.11.4-26.P2.el7_9.3 updates bind-utils.x86_64 32:9.11.4-26.P2.el7_9.3 updates bindfs.x86_64 1.13.11-1.el7 epel
至少安裝以下三個:
bind.x86_64
bind-chroot.x86_64
bind-utils.x86_64
這裡推薦使用原始碼安裝
3,Bind的啟動、停止、重啟
named -c /usr/local/named/etc/named.conf -g #named預設是以daemon的形式執行的,-g的引數表示前端執行,這樣看到啟動時的錯誤資訊
啟動:
named -c /usr/local/named/etc/named.conf
如果啟用rndc,可用使用rndc的命令重新載入配置。
rndc reload //重新載入配置
rndc stop //停止服務
4,Bind 配置介紹:
1、ACL語句
ACL語句的使用方法參考:Bind中定義和使用訪問控制列表(ACL)[必讀],通過文章的瞭解能夠對ACL語句的使用有個非常清晰的瞭解。
2,controls語句
3,include語句
4,key語句
5,logging語句
6,lwres語句
7,view
8,zone
9,options
10,server
11,trusted-keys
後面我們來對上述的配置一一展開介紹
官方文件:http://ftp.isc.org/isc/bind9/9.11.0-P3/doc/arm/Bv9ARM.pdf