考试网 >> IT认证 >> Linux >> Linux指导 >> 服务器软件安装笔记[2]

服务器软件安装笔记[2]

发布时间:2006-06-28 10:51     点击:
分页:[1] 2 3 4  下一页

3、安装Bind

a、 #tar –zxvf bind-9.2.1.tar.gz

#cd bind-9.2.1

#./configure --prefix=/opt/bind --with-libtool --enable-threads

#make

#make install

这种编译源码的安装方式是不会自动创建named.conf和工作目录的,要手工创建。

b、建立named用户和相应文件夹:

#mkdir /opt/bind/etc

#mkdir /opt/bind/var

#mkdir /opt/bind/var/named

#mkdir -p /opt/bind/var/named/run

#useradd -u 25 -d /opt/bind/var/named -s /bin/false named

#chown -R named /opt/bind/var /opt/bind/etc(因为要在这个etc目录下建立named.pid文件)

运行/opt/bind/sbin/rndc-confgen获得rndc-key,利用生成的信息建立rndc.conf,保存在/opt/bind/etc下:

key "rndc-key" {

algorithm hmac-md5;

secret "Gm8BCInQhk4OtQtwVjOE/w==";

};

options {

default-key "rndc-key";

default-server 127.0.0.1;

default-port 953;

};

c、建立/opt/bind/etc/named.conf文件(只是基本型,进阶型还没有研究):

options {

directory "/opt/bind/var/named";

pid-file "/opt/bind/etc/named.pid";

notify yes;

allow-transfer {

210.xx.xx.xx;

};

};

zone "." {

type hint;

file "named.root";

};

zone "0.0.127.IN-ADDR.ARPA" {

type master;

file "Localhost";

};

zone "cc.net" {

type master;

file "cc.net.hosts";

};

key "rndc-key" {

algorithm hmac-md5;

secret "Gm8BCInQhk4OtQtwVjOE/w==";

};

controls {

inet 127.0.0.1 port 953

allow { 127.0.0.1; } keys { "rndc-key"; };

};

d、在工作目录/opt/bind/var/named中生成named.conf文件中标记的文件:

#vi named.root
分页:[1] 2 3 4  下一页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有