[root@email named]# rpm -qa |grep bind
bind-utils-9.3.3-7.el5
bind-chroot-9.3.3-7.el5
ypbind-1.19-7.el5
bind-9.3.3-7.el5
bind-libs-9.3.3-7.el5
二、说明:
我之前用过Redhat7.2-9,现在发现RHEL5.0在bind软件中使用了chroot技术,对于我这样之前没有接触过的人来说可能会造成一些麻烦,在这里我先说明一下。
由于使用了chroot技术,因此要求 named.conf 及全部的区域数据文件都在/var/named/chroot下,朋友们在配置bind的时候不用考虑他们在原来的位置的情况,例如:
配置文件 named.conf 在RHEL5.0 中的位置应该为 /var/named/chroot/etc
系统自带的区域数据文件及自己建立的区域数据文件的位置应该放置到 /var/named/chroot/var/named/ 目录下。
而且大家一定要注意,这些文件的属 *** 一定要设置成 root:named。
三、配置方法
默认情况喜下,系统没有安装caching-nameserver-9.3.3-7.el5包,因此,配置DNS需要的配置文件都没有,例如没有 named.conf 及任何区域数据文件。
这时我们可以手动安装 caching-nameserver-9.3.3-7.el5包,它提供了RHEL5.0下初始化文件的方法。安装此包后,
在/var/named/chroot/etc/ 下,多出了一些配置文件:
[root@email etc]# ls
localtim med.caching-nameserver.conf named.rfc1912.zones rndc.key
在这里,我们通过拷贝 named.rfc1912.zones 作为named.conf文件,并在此文件中添加自己的区域。
# cp named.rfc1912.zones named.conf
# vi named.conf
如下内容:(我设置了两个域,microtrend.cn及xinry.com)
[root@email etc]# more named.conf
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
directory "/var/named";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
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 "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
会员注册
会员登录
个人空间