在Linux平台下如何能够比较快速的配置DNS服务器呢?很多网络管理员觉得比较麻烦。我现在就我在实践中的方法总结如下的案例学习法。
案例:某单位的域名是:avnads.cn , www主机的地址是:192.168.1.1,DNS服务器的地址是:192.168.1.100,完成DNS服务器的配置。
步骤:
1. 安装bind软件包:
#rpm –qa|grep bind
#mount /mnt/cdrom
#cd /mnt/cdrom/RedHat/RPMS
#rpm –ivh bind-9.2.1-16.i386.rpm
#rpm –ivh bind-utils-9.2.1-16.i386.rpm
#rpm –ivh redhat-config-bind-1.9.0-13.noarch.rpm
#rpm –ivh caching-nameserver-7.2.-7.noarch.rpm
2. 编辑主配置文件:
#vi /etc/named.conf
options {
directory “/var/named”;
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone “.” IN {
type hint;
file “named.ca”;
};
zone “localhost” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};
zone “0.0.127.in-addr.arpa” IN {
type master;
file “named.local”;
};
include “/etc/rndc.key”;
//××××××如下内容是我的配置
zone “seogate.cn” IN {
type master;
file “seogate.cn.hosts”;
allow-update { none; };
};
zone “1.168.192.in-addr.arpa” IN {
type master;
file “192.168.1.rev”;
allow-update { none; };
};