你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS 5.2下安装Bind9.6

[日期:2013-02-24] 来源:Linux社区  作者:linuxguying [字体: ]
安装bind前先安装gcc,配置好yum源,yum -y install gcc,如果有run.pid报错,直接rm -rf /var/run/yum.pid (解决yum-updatesd服务正运行的情况)
 
下载 bind9.6到/root/Desktop,先进至目录里,然后wget ftp://ftp.isc.org/isc/bind9/9.6.0-P1/bind-9.6.0-P1.tar.gz
 
解压bind-9.6.0-P1.tar.gz
 
# tar zxvf bind-9.6.0-P1.tar.gz
 
进入 bind-9.6.0-P1.gz文件夹
 
# cd bind-9.6.0-P1
 
创建安装目录,我是安装在 /opt/bind
 
# mkdir /opt/bind
 
编译,指定安装目录,开启多线程支持
 
#./configure --prefix=/opt/bind --enable-threads --disable-openssl-version-check --disable-ipv6
 
 
 
#Make 大约需要几分钟,只要不报错就继续下去。
 
# make
 
#Make install 安装
 
# make install
 
没有报错,就表示安装成功了。
 
 
 
开始配置bind,接下来的过程是让rndc来管理bind9.6
 
创建 rndc.conf文件,用bind自带程序生成
 
进入/opt/bind/etc,将rndc.conf及named.conf生成
 
# cd /opt/bind/etc
 
# /opt/bind/sbin/rndc-confgen > /opt/bind/etc/rndc.conf
 
把rndc.conf 中的key信息输出到 named.conf 中
 
# tail -10 rndc.conf | head -9 | sed -e s/#\ //g > named.conf
 
 
 
 
 
这里强调一下,rndc.conf与named.conf的key值必须完全一样,而且并不需要生成rndc.key,这个问题纠缠了我大约3个小时
 
 
 
# vim named.conf
 
key "rndc-key" {
 
        algorithm hmac-md5;
 
        secret "WeHHAt0lui+9WihUW6HdsQ==";
 
};
 
 
 
controls {
 
        inet 127.0.0.1 port 953
 
                allow { 127.0.0.1; } keys { "rndc-key"; };
 
};
 
options {
 
directory "/opt/bind/var/named";
 
};
 
 
 
zone "." IN {
 
type hint;
 
file "named.ca";
 
};
 
 
 
zone "localhost" IN {
 
type master;
 
file "localhost.zone";
 
};
 
 
 
zone "0.0.127.in-addr.arpa" IN {
 
type master;
 
file "named.local";
 
allow-update { none; };
 
};
 
 
 
zone "linuxidc.com" IN {
 
type master;
 
file "linuxidc.zone";
 
};
 
zone "88181.com" IN {
 
type master;
 
file "88181.zone";
 
 
 
};linux
相关资讯       Bind 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款