CentOS 7.x 編譯安裝 bind

Internet Systems Consortium

https://www.isc.org/


Internet Systems Consortium Download

https://www.isc.org/download/


安裝 BIND
tar zxf bind-9.11.14.tar.gz
cd bind-9.11.14
指令說明
./configure -h

./configure
make depend
make
make install
make clean

設定 bind
/usr/sbin/rndc-confgen -a -c /etc/rndc.key
/usr/sbin/rndc-confgen > /etc/rndc.conf
vi /etc/rndc.key
vi /etc/rndc.conf
vi /etc/named.conf

將 127.0.0.1 改為 any
listen-on port 53 { any; };
將 localhost 改為 any
allow-query { any; };
註解掉 ipv6
#listen-on-v6 port 53 { ::1; };
設定域名
vi /etc/named.rfc1912.zones
最下面加入
zone "網域名稱" IN { type master; file "網域名稱設定檔"; allow-update { none; }; };

多數網域設定檔快速方法

先把檔案傳到 /var/named/chroot/var/named

再做權限變更

chown root.named named.*
chmod 640 named.*

然後移動檔案至 /var/named

mv named.* /var/named

啟動 named
systemctl start named
開機啟動
systemctl enable named
新增時間 2020-01-22
最後更新 2022-02-09