P.s. 本次使用服務(wù)器為:CentOS 7.5 ,DNS軟件為bind-9.12.3-P1,使用源碼安裝。
-
下載bind軟件包
-
解壓
tar -zxvf bind-9.12.3-P1.tar.gz -
編譯安裝
./configure --prefix=/usr/local/bind/ --sysconfdir=/etc/named/ --with-dlz-mysql=/usr/local/mysql --with-dlz-postgres=/usr/local/PostgreSQL/9.1 --enable-largefile --enable-threads=no --with-openssl --mandir=/usr/local/bind/share/man make -j 4 make install -
創(chuàng)建主配置文件named.conf和rndc.key
rndc-confgen -r /dev/urandom >rndc.conf head -5 rndc.conf >/etc/named/rndc.key wget -O /tmp/named.conf http://www.internic.net/domain/named.root -
安裝文件說明
[root@testdns man8]# tree /etc/named/ -L 2 /var/named/ /usr/local/bind/ /etc/named/ ├── named.conf #主配置文件 /var/named/ #區(qū)域配置文件 /usr/local/bind/ ├── bin #工具包 │ ├── dig │ ├── host │ ├── nslookup ├── include #包含的一些包文件 ├── lib #庫文件 ├── sbin │ ├── named #主程序 │ ├── named-checkconf #檢查配置文件 │ ├── named-checkzone #檢查區(qū)域配置文件 │ ├── rndc #遠(yuǎn)程控制工具 │ ├── rndc-confgen #生成/etc/rndc.conf配置文件 ├── share #幫助文檔 └── var #運行進程文件 -
啟動dns服務(wù)測試是否安裝成功
named -f -g -d 3 -u named
測試結(jié)果