- 论坛徽章:
- 4
|
2可用积分
安装bind 9.5.0a6
tar -zxvf bind-9.5*
cd bind*
./configure --prefix=/usr/local/named \
--enable-threads
make
make install
cd /usr/local/named
sbin/rndc-confgen > etc/rndc.conf //这一步,到现在都是一知半解,大概是生成密匙
cd etc
tail -10 rndc.conf | head -9 | sed s/#\ //g > named.conf //这一步只知道生成named.conf文件,但打开文件,里面是一些加密的字符,跟passwd差不多
mkdir /var/named
在/var/named目录下分别建立named.root //根域名服务器
建立localhost.zone
建立named.local
建立test.zone //正解析
建立test.local //反解析
在named.root里加入以下内容:
key "rndc-key" {
algorithm hmac-md5;
secret "j4TzPFdh8r6b+QVY2VXWvw==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
______________________________________________________________//以上部分不知道干什么的。不是自己加的
options {
directory "/var/named";
pid-file "named.pid";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.root";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "test.com" IN {
type master;
file "test.zone";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "test.local";
allow-update { none; };
};
启动bind
/usr/local/named/sbin/named -g
错误如下:
[root@localhost sbin]# /usr/local/named/sbin/named -g
03-Apr-2008 20:31:21.774 starting BIND 9.5.0b2 -g
03-Apr-2008 20:31:21.774 found 2 CPUs, using 2 worker threads
03-Apr-2008 20:31:21.776 loading configuration from '/usr/local/named/etc/named.conf'
03-Apr-2008 20:31:21.776 /usr/local/named/etc/named.conf:16: unknown key 'rndckey'
03-Apr-2008 20:31:21.777 loading configuration: failure
03-Apr-2008 20:31:21.777 exiting (due to fatal error)
麻烦大伙帮忙,如果实不能解决,给份完整的安装笔记也行。
nslookup 也不行,host也不行。 |
最佳答案
查看完整内容
将/usr/local/named/etc/named.conf中的controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; };};修改为controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; };};
|