BIND easy do

由 nicosoft 在 05-21-2003 05:19 发表:

BIND easy do

好久没有装BIND了,今天要刚好要用上,于是就复习了一下,

整理一些思路,以供同好参考。

从ftp.bupt.edu.cn上找来了,(这个站点很多东西哦,而且速度很快,还是教育网的,不出国~^_^):

bind-9.2.0rc1.tar.gz

named.root

将找到的素材都下到/tmp中,然后准备开始

#cd tmp

tar zxvf bind-9.2.0rc1.tar.gz

cd bind-9.2.0rc1

#./configure --prefix=/usr/local/named

#make && make install

#mkdir /usr/local/named/etc

#mkdir /usr/local/named/var

#cp named.root /usr/local/named/etc

#cd /usr/local/named

#sbin/rndc-confgen > etc/rndc.conf

#cd etctail -n10 rndc.conf | head -n9 | sed -e s/#\ //g >> named.conf

#vi etc/named.conf

我的内容如下,你可以按照你的内容改写:

-----------------------------------------------------

options{

directory "/var/namedb";

pid-file "named.pid";

};

zone "." {

type hint;

file "named.root";

notify no;

};

zone "0.0.127.in-addr.arpa" {

type master;

file "localhost.rev";

notify no;

};

#定义一个正向主区域

zone "xxx.edu.cn" {

type master;

file "xxx.edu.cn.zone";

notify no;

};

#定义一个方向主区域;

zone "209.119.202.in-addr.arpa" {

type master;

file "db.202.119.209";

notify no;

};

-----------------------------------------------------

保存,然后退出VI

#mkdir /var/namedb

#touch localhost.rev xxx.edu.cn.zone db.202.119.209

三个文件的内容分别是:

localhost.rev

-----------------------------------------------------

$TTL 3600

@ IN SOA dns.xxx.edu.cn. root.xxx.edu.cn. (

2003052001 ;serial

3600;refresh

900;retry

360000;expire

3600);miminume

IN NS dns.xxx.edu.cn.

1 IN PTR localhost.

xxx.edu.cn.zone

-----------------------------------------------------

$TTL 3600

@ IN SOA dns.xxx.edu.cn. root.xxx.edu.cn. (

2003052001 ;serial

3600;refresh

900;retry

360000;expire

3600);miminume

IN NS dns.xxx.edu.cn.

dns IN A 202.119.209.98

mail IN CNAME dns

www IN A 202.119.209.99

db.202.119.209

-----------------------------------------------------

$TTL 3600

@ IN SOA dns.xxx.edu.cn. root.xxx.edu.cn. (

2003052001 ;serial

3600;refresh

900;retry

360000;expire

3600);miminume

IN NS dns.xxx.edu.cn.

98 IN PTR dns.xxx.edu.cn.

99 IN PTR www.xxx.edu.cn.

启动服务!

#named -gc /usr/local/named/etc/named.conf &

May 21 04:45:06.577 starting BIND 9.2.0rc1 -gc /usr/local/etc/named.conf

May 21 04:45:06.577 using 1 CPU

May 21 04:45:06.585 loading configuration from '/usr/local/etc/named.conf'

May 21 04:45:06.586 /usr/local/etc/named.conf:9: option 'notify' is not allowed in 'hint' zone '.'

May 21 04:45:06.621 no IPv6 interfaces found

May 21 04:45:06.622 listening on IPv4 interface lo, 127.0.0.1#53

May 21 04:45:06.623 listening on IPv4 interface eth0, 202.119.209.98#53

May 21 04:45:06.632 command channel listening on 127.0.0.1#953

May 21 04:45:06.633 ignoring config file logging statement due to -g option

May 21 04:45:06.637 zone 0.0.127.in-addr.arpa/IN: loaded serial 2003052001

May 21 04:45:06.641 zone 209.119.202.in-addr.a

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus