zone "6.168.192.in-addr.arpa"{
type master;
file "192.168.6.db";
};
[root@localhost root]# cp /etc/named.conf /etc/named.conf.sample
[root@localhost root]# vi /etc/named.conf
在最后一行之前,输入下面内容:
zone "gr.org"{
type master;
file "gr.org.db";
};
zone "6.168.192.in-addr.arpa"{
type master;
file "192.168.6.db";
};
2、创建正向区域文件 /var/named/gr.org.db
内容为:
$TTL 86400
@ IN SOA ns.gr.org. root.gr.org.(
20140308 ;serial
8H ;refresh
4H ;retry
6W ;expiry
1D ) ;minimum
IN NS ns.gr.org.
IN MX 10 mail.gr.org.
bbs IN CNAME www.gr.org.
ns IN A 192.168.6.3
www IN A 192.168.6.3
mail IN A 192.168.6.4
[root@localhost root]# cd /var/named
[root@localhost named]# cat > gr.org.db
$TTL 86400
@ IN SOA ns.gr.org. root.gr.org.(
20140308 ;serial
8H ;refresh
4H ;retry
6W ;expiry
1D ) ;minimum
IN NS ns.gr.org.
IN MX 10 mail.gr.org.
bbs IN CNAME www.gr.org.
ns IN A 192.168.6.3
www IN A 192.168.6.3
mail IN A 192.168.6.4
3、创建反向区域文件 /var/named/192.168.6.db
内容为:
$TTL 86400
@ IN SOA gr.org. root.gr.org.(
20140308 ;serial
8H ;refresh
4H ;retry
6W ;expiry
1D ) ;minimum
IN NS ns.gr.org.
3 IN PTR ns.gr.org.
3 IN PTR www.gr.org.
4 IN PTR mail.gr.org.
[root@localhost named]# cat > /var/named/192.168.6.db
$TTL 86400
@ IN SOA gr.org. root.gr.org.(
20140308 ;serial
8H ;refresh
4H ;retry
6W ;expiry
1D ) ;minimum
IN NS ns.gr.org.
3 IN PTR ns.gr.org.
3 IN PTR www.gr.org.
4 IN PTR mail.gr.org.
4、查看named是否已启动:
#ps -ax | grep named
[root@localhost named]# ps -ax | grep named
#
启动之:
#service named start
[root@localhost named]# service named start
[root@localhost named]# [ 确定 ]