BIND是一种开源的DNS(Domain Name System)协议的实现,包含对域名的查询和响应所需的所有软件。它是互联网上最广泛使用的一种DNS服务器,下面讲解在linux系统下如何安装DNS服务器bind。
1.从http://www.isc.org/products/BIND/bind9.html下载bind9的源文件。目前版本为9 .23,源文件为bind-9.2.3.tar.gz。
2.将源文件bind-9.2.3.tar.gz置于/usr/local/src目录下。
3.解压缩源文件bind-9.2.3.tar.gz
# tar -xzvf bind-9.2.3.tar.gz -C /usr/local/src
4.进入安装目录
# cd bind-9.2.3
5.配置、编译
# ./configure
# make
6.安装
# make install
7.生成的可执行文件位于/usr/local/sbin目录下。最重要的可执行文件为named和rndc。
8.创建链接
# ln -s /usr/local/sbin/rndc /usr/sbin/rndc
# ln -s /usr/local/sbin/named /usr/sbin/named
9.创建rndc.conf配置文件。
# /usr/local/sbin/rndc-confgen > /etc/rndc.conf
# cat /etc/rndc.conf
输出为:
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "y9xvvfQjdWv9f/Fo7wquBg==";
};
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf
# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "y9xvvfQjdWv9f/Fo7wquBg==";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "