$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 127.0.0.1
IN AAAA ::1
[root@Linserv ~]# cat /var/named/named.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
[root@Linserv ~]# grep -v '^;' /var/named/named.ca | head
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
[root@Linserv ~]# cat /var/named/yang.com.zone
$TTL 86400
@ IN SOA ns1.yang.com. admin.yang.com. (
42
3H
15M
1W
1D)
@ IN NS ns1.yang.com.
@ IN NS ns2.yang.com.
ns1 IN A 192.168.0.20
ns2 IN A 192.168.0.254
host1 IN A 192.168.0.20
www IN CNAME host1
mail IN CNAME host1
@ IN MX 5 mail.yang.com.
[root@Linserv ~]# cat /var/named/192.168.0.rev
$TTL 86400
@ IN SOA ns1.yang.com. admin.yang.com. (
42
3H
15M
1W
1D)
@ IN NS ns1.yang.com.
@ IN NS ns2.yang.com.
20 IN PTR ns1.yang.com.
254 IN PTR ns2.yang.com.
[root@Linserv ~]# service named start
Starting named: [ OK ]
[root@Linserv ~]# chkconfig --level 35 named on
login as: root
root@192.168.0.254's password:
Last login: Fri Nov 14 06:24:34 2008 from 192.168.0.2
[root@localhost ~]# rpm -ivh /mnt/Server/bind-9.3.3-7.el5.i386.rpm
warning: /mnt/Server/bind-9.3.3-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:bind ########################################### [100%]
[root@localhost ~]# rpm -ql bind |grep /etc
/etc/dbus-1/system.d/named.conf
/etc/logrotate.d/named
/etc/rc.d/init.d/named
/etc/sysconfig/named
/usr/share/doc/bind-9.3.3/sample/etc
/usr/share/doc/bind-9.3.3/sample/etc/named.conf
/usr/share/doc/bind-9.3.3/sample/etc/named.rfc1912.zones
/usr/share/doc/bind-9.3.3/sample/etc/named.root.hints
/usr/share/doc/bind-9.3.3/sample/etc/rndc.conf
[root@localhost ~]# mv /usr/share/doc/bind-9.3.3/sample/etc/named.conf /etc/named.conf
[root@localhost ~]# ls /var/named
data slaves
[root@localhost ~]# ls /var/named/slaves/
[root@localhost ~]#
[root@localhost ~]# vi /etc/named.conf
options{
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};
zone "yang.com" IN {
type slave;
file "slaves/yang.com.zone";
masters {192.168.0.20;};
};
zone "0.168.192.in-addr.arpa" IN {
type slave;
file "slaves/192.168.0.rev";
masters {192.168.0.20;};
};
[root@localhost ~]# service named start
Starting named: [ OK ]
[root@localhost ~]# ls /var/named/slaves/
yang.com.zone