一、软件包安装:
cd /home/DZP/cdrom/Packages/
rpm -ivh bind-utils-9.7.3-8.P3.el6.x86_64.rpm
rpm -ivh bind-9.7.3-8.P3.el6.x86_64.rpm bind-chroot-9.7.3-8.P3.el6.x86_64.rpm cachefilesd-0.10.2-1.el6.x86_64.rpm
cd /var/named/chroot/etc/
vi named.conf
[配置如下]
options
{
directory "/var/named";
}
view "lan"
{
match-clients { 172.30.75.0/24 };
zone "benet.com" IN {
type master;
file "benet.com.zone.lan";
};
};
view "wan"
{
match-clients { any };
zone "benet.com" IN {
type master;
file "benet.com.zone.wan";
};
};
cd /var/named/chroot/var/named/
cat /etc/hosts //确认DNS服务器的各种地址信息
cat /etc/resolv.conf
NS1:
软件查询和安装:
rpm -ivh caching-nameserver-9.3.3-7.el5.i386.rpm --nodeps --force
rpm -qa | grep ^bind
bind-utils-9.7.3-8.P3.el6.x86_64
bind-libs-9.7.3-8.P3.el6.x86_64
yum install bind-chroot*
修改主机名:
hostname ns1.benet.com
修改hosts文件:
vi /etc/hosts
172.30.75.132 ns1.benet.com ns1
172.30.75.133 ns2.benet.com ns2
vi /var/named/chroot/etc/named.conf
[配置内容]
options
{
directory "/var/named";
};
zone "benet.com" IN
{
type master;
file "benet.com.zone";
allow-transfer {172.30.75.133;};
};
zone "accp.com" IN
{
type master;
file "accp.com.zone";
allow-transfer {172.30.75.133;};
};
zone "67.45.123.in-addr-arpa" IN
{
type master;
file "123.45.67.arpa";
allow-transfer {172.30.75.133;};
};
cd /var/named/chroot/var/named/
vi benet.com.zone
[配置内容]
$TTL 86440
@ SOA benet.com. admin.benet.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
IN MX 10 mail.benet.com.
ns1 IN A 172.30.75.132
ns2 IN A 172.30.75.133
mail IN A 123.45.67.89
ftp IN A 123.45.67.90
www IN A 123.45.67.88
- IN A 123.45.67.88
cp benet.com.zone accp.com.zone
vi accp.com.zone
$TTL 86440
@ SOA accp.com. admin.accp.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
ns1 IN A 172.30.75.132
ns2 IN A 172.30.75.133
mail IN A 123.45.67.89
ftp IN A 123.45.67.90
www IN A 123.45.67.88
- IN A 123.45.67.88
cp benet.com.zone 123.45.67.arpa
vim 123.45.67.arpa
$TTL 86440
@ rpa SOA benet.com. admin.benet.com.
(
2011030781
4H
30M
12H
1D
)
@ IN NS ns1.benet.com.
IN NS ns2.benet.com.
IN MX 10 mail.benet.com.
88 IN PTR www.benet.com
89 IN PTR mail.benet.com
90 IN PTR ftp.benet.com