BIND Manual
一、安装
1. linux环境
#cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 4) |
2. 管理员登录
以管理员root账号登录
3. 配置
#cd /etc/
#tail -n 4 rndc.conf > rndc.key
#vi rndc.key
key "rndckey" { algorithm hmac-md5; secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K"; }; |
#vi /var/named/chroot/etc/named.conf
options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; recursion yes; forwarders { ***.106.0.20; }; }; … zone "***.cn" IN { type master; file "***.cn.zone"; allow-update { none; }; forwarders {}; }; zone "scm5.***.cn" IN { type master; file "scm5.***.cn.zone"; allow-update {none;}; forwarders {}; }; include "/etc/rndc.key"; |
#vi /var/named/chroot/var/named/***.cn.zone
$TTL 86400 $ORIGIN ***.cn. @ IN SOA ***.cn. root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ IN NS dns.***.cn. @ IN MX 5 mail.***.cn. @ IN A ***.157.122.53 dns IN A 10.1.56.42 mail IN A ***.100.7.27 scm1 IN A 10.1.56.203 scm2 IN A 10.1.56.213 scm3 IN A 10.1.56.214 scm4 IN A 10.1.56.222 |
#vi /var/named/chroot/var/named/scm5.***.cn.zone
$TTL 86400 $ORIGIN scm5.***.cn. @ IN SOA scm5.***.cn. root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ IN NS dns.scm5.***.cn. @ IN MX 5 mail.scm5.***.cn. @ IN A ***.51.173.24 dns IN A 10.1.56.42 mail IN A ***.51.173.24 |
#chown named.named /var/named/chroot/var/named/scm5.***.cn.zone
#vi /etc/resolv.conf
nameserver 10.1.56.42 nameserver ***.106.0.20 |
#service named restart
#chkconfig named on
#chkconfig --level 35 named on