DNS服务器分为三种类型,Master Slave Cache-Only
安装DNS,首先安装三个rpm包
bind-utils bind- bind-chroot
安装完成后会有个/etc/named.conf的文件产生,如果没有,,安装caching-servers.***.rpm包
会在/etc/下产生named.**.zones cp /etc/named.**.zones /etc/named.conf
在配置文件中添加解析记录
vi /etc/named.conf
zone "mic.com" IN {
type master; 服务器类型
file "mic.zone"; 指定解析文件
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "mic.local";
};
cd /var/named/chroot/var/named
cp localdomain.zone mic.zone
cp named.local mic.local
vi mic.zone
$TTL 86400
@ IN SOA ns.mic.com. root.mic.com. (
2007100800 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns.mic.com
@ IN NS ns1.mic.com
ns IN A 192.168.1.100
ns1 IN A 192.168.1.200
www CNAME ns
mail CNAME ns1
@ IN MX 5 mail
vi mic.local
$TTL 86400
@ IN SOA ns.mic.com root.mic.com. (
2007100800 ; Serial
3h ; Refresh
15m ; Retry
1w ; Expire
1d ) ; Minimum
IN NS ns.mic.com.
100 IN PTR ns.mic.com.
200 IN PTR ns1.mic.com.
启动named服务 service named restart
测试:nslookup
>
>192.168.1.200
阅读(762) | 评论(0) | 转发(0) |