下载软件包
wget https://ftp.isc.org/isc/bind9/cur/9.10/bind-9.10.5.tar.gz -P /usr/local
软件安装
tar xvf /usr/local/bind-9.10.5.tar.gz
cd /usr/local/bind-9.10.5
./configure --enable-largefile --enable-threads --prefix=/usr/local/named
make && make install
配置
- 设置rndc密钥配置文件
/usr/local/named/sbin/rndc-confgen > /usr/local/named/etc/rndc.conf
- 将rndc密钥文件配置在named.conf文件中
vi /usr/local/named/named.conf
脚本如下:
options{
directory"/var/named";
};
zone"."IN{
typehint;
file"named.ca";
};
zone"localhost"IN{
typemaster;
file"named.localhost";
allow-update{none;};
};
zone"0.0.127.in-addr.arpa"IN{
typemaster;
file"named.loopback";
allow-update{none;};
};
Usewiththefollowinginnamed.conf,adjustingtheallowlistasneeded:
key"rndc-key"{
algorithmhmac-md5;
secret"4a8/AsRRQ5OH5a0oRaBeAg==";
};
controls{
inet127.0.0.1port953
allow{127.0.0.1;}keys{"rndc-key";};
};
至此,已经完成bind基础配置,但仍不能使用。下篇文章将继续介绍BIND配置