Install the Bind package:
Yum install bind-utils bind-chroot
Edit the configuration file:
Tips
1. The configuration file must belong to the named group.
2. if you simply configure the cache DNS, you 'd better note the green part, when forwarders points to my own DNS server or 8.8.8.8, it cannot be resolved (pointing to 202.96.209.133 and parsing ).
3. After service named restart, check whether the error is returned by sticking to/var/log/message.
4. Modify the nameserver address of/etc/resolv. conf during testing.
Vim/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 {Any ;};
# Listen-on-v6 port 53 {:: 1 ;};
Directory "/var/named ";
Dump-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 {Any ;};
Forward only;
Forwarders {192.168.17.253 ;};
# Forwarders {202.96.209.20 ;};
Recursion yes;
# DNSSEC-enable yes;
# DNSSEC-validation yes;
# DNSSEC-lookaside auto;
/* Path to isc dlv key */
# Bindkeys-file "/etc/named. iscdlv. Key ";
};
Logging {
Channel default_debug {
File "Data/named. Run ";
Severity dynamic;
};
};
Zone "." In {
Type hint;
File "named. ca ";
};
Include "/etc/named. rfc1912.zones ";
Ref: http://linux.vbird.org/linux_server/0350dns.php