Redhat Linux下Bind的快速安装
人气:1想了解Redhat Linux下Bind的快速安装的相关内容吗,在本文为您仔细讲解的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:Redhat,Linux下Bind的快速安装,下面大家一起来学习吧。
1.使用光盘自带的软件包,安装以下包: bind
bind-utils
bind-libs
(rpm -i xxx.rpm)
2.
将named服务设置为自启动
(使用ntsysv,chkconfig等工具)
3.
假设你需要解析bcomcn.com,如下操作:
cd /var/named
cp localdomain.zone bcomcn.zone
vi bcomcn.zone
$TTL 86400
@ IN SOA ns.bcomcn.com. root.bcomcn.com. (
200612230 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.bcomcn.com.
IN MX 10 mail.bcomcn.com.
ns.bcomcn.com. IN A 192.168.1.5
mail.bcomcn.com. IN A 192.168.1.5
www.bcomcn.com. IN A 192.168.1.5
注意,主机名后面带"点"的,表示是一个完整主机,不带点的,表示还要加上当前域名,比如:mail.bcomcn.com. = mail
cp localdomain.zone 192.zone
vi 192.zone
$TTL 86400
@ IN SOA localhost. root.bcomcn.com. (
200612230 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
5 IN PTR www.bcomcn.com.
4.修改/etc/named.conf,加入:
zone "bcomcn.com" IN {
type master;
file "bcomcn.zone";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "192.zone";
allow-update { none; };
};
启动named,将本机的DNS服务器设置为本机,用nslookup,或其它工具检测:
nslookup
> set type=mx
> bcomcn.com
(可以查看/var/log/message检查named是否正确启动,是否加载某个Domain的解析.)
加载全部内容