1. Install the Package
[email protected] ~]# Yum install bind*
2. Edit the configuration file
[[email protected] ~]# more /etc/named.conf //// named.conf//// provided by Red Hat bind package to configure the ISC BIND Named (8) DNS// server as a caching only nameserver (as a Localhost dns resolver only) .//// see /usr/share/doc/bind*/sample/ for example named configuration files.// options {listen-on port 53 {  127.0.0.1; 10.20.20.66; };LISTEN-ON-V6 PORT 53 { ::1;&NBSP,};d irectory "/var/named";d ump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt";allow-query { localhost; 10.20.20.0/24;}; Recursion yes; dnssec-enable yes;dnssec-validation yes;dnssec-lookaside auto; /* Path to ISC DLV key */bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic";}; logging { channel default_debug { file "data/ Named.run "; severity dynamic; };}; zone "." IN {type hint;file "named.ca";}; zone "****.local" IN {type master;file "forward.testlocal"; allow-update { none;};}; zone "20.20.10.in-addr.arpa" IN {type master;file "reverse.testlocal"; allow-update {none;};}; include "/etc/named.rfc1912.zones ";include "/etc/named.root.key ";
3. Edit the Forward file
[Email protected] ~]# more/var/named/forward.testlocal $TTL 86400@ in SOA dns01.****.local. Root.dns01.test.local. (2011071001; Serial3600; Refresh1800; Retry604800; Expire86400; Minimum TTL) @ in NS dns01.test.local.@ in a 10.20.20.66 dns01 in a 10.20.20.66
4. Edit Reverse File
[Email protected] ~]# more/var/named/reverse.testlocal $TTL 86400@ in SOA dns01.****.local. Root.dns01.test.local. (2011071001; Serial3600; Refresh1800; Retry604800; Expire86400; Minimum TTL) @ in NS dns01.test.local.@ in PTR test.local. Dns01 in A 10.20.20.66-in PTR dns01.test.local.
5. Start the service
Service named Startchkconfig named on
6, the DNS log configuration, the Bind log mode is set as follows, note the/var/named directory write permissions
logging {// channel default_debug {// file "data/ Named.run ";// severity dynamic;// };//}; logging { channel bind_log { file "Bind.log" versions 3 size 20m; severity info; print-time yes; print-category yes; }; category queries { bind_log; };};
Reference Links:
http://onlyzq.blog.51cto.com/1228/546630/
Http://www.mamicode.com/info-detail-493643.html
CentOS6.5 Configuring the DNS service