1.使用光盘自带的软件包,安装以下包:
bind
bind-utils
bind-libs
(rpm-ixxx.rpm)
2.
将named服务设置为自启动
(使用ntsysv,chkconfig等工具)
3.
假设你需要解析bcomcn.com,如下操作:
cd/var/named
cplocaldomain.zonebcomcn.zone
vibcomcn.zone
$TTL86400
@INSOAns.bcomcn.com.root.bcomcn.com.(
200612230;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
INNSns.bcomcn.com.
INMX10mail.bcomcn.com.
ns.bcomcn.com.INA192.168.1.5
mail.bcomcn.com.INA192.168.1.5
www.bcomcn.com.INA192.168.1.5
注意,主机名后面带"点"的,表示是一个完整主机,不带点的,表示还要加上当前域名,比如:mail.bcomcn.com.=mail
cplocaldomain.zone192.zone
vi192.zone
$TTL86400
@INSOAlocalhost.root.bcomcn.com.(
200612230;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
INNSlocalhost.
5INPTRwww.bcomcn.com.
4.修改/etc/named.conf,加入:
zone"bcomcn.com"IN{
typemaster;
file"bcomcn.zone";
allow-update{none;};
};
zone"1.168.192.in-addr.arpa"IN{
typemaster;
file"192.zone";
allow-update{none;};
};
启动named,将本机的DNS服务器设置为本机,用nslookup,或其它工具检测:
nslookup
>settype=mx
>bcomcn.com
(可以查看/var/log/message检查named是否正确启动,是否加载某个Domain的解析.)
【Redhat Linux下Bind的快速安装】相关文章:
★ linux的简介 linux与windows服务器系统的区别