linux下的DNS 的配置 (RH4)

DNS   (RH4)

mastar

1.       安装所需软件包

光盘4 bind-9.2.4-2.i386.rpm  bind-devel-9.2.4-2.i386.rpm  bind-chroot-9.2.4-2.i386.rpm

光盘 1 caching-nameserver-7.3-3.noarch.rpm

2. 配置IP 192.168.2.1 

3. etc/hosts   添加 192.168.2.1      ash.com

4./etc/resolv.conf  将 nameserver 设置为 192.168.2.1

5.配置 /etc/named.conf

添加 2个区域

zone “ash.com” IN {

type master;

file “ash.com.zone”;

};

zone “2.168.192.in-addr.arpa” IN{

type master;

file “ash.com.local”;

};

 6.在/var/named/chroot/var/named 添加2个文件   ash.com.zone ash.com.local

7. 启动服务

 service named start

SLAVE

3台虚拟机 linux1 linux2 linux3

linux1 master linux2 slave linux3 客户端

1. linux1 配置成master (见上一章)

2 .linux2 安装软件包 (和master 一样)

3.配置 ip 192.168.2.2

4.配置 linux2 /etc/named.conf

添加2个区域

zone “ash.com” {

type slave;

masters  {192.168.2.1;} ;

file “slaves/ash.com.zone”;

};

zone “1.168.192.in-addr.arpa” {

type slave;

masters {192.168.2.1;};

file “slaves/ash.com.local”

};

5 .启动服务  server named start

相关推荐