Saturday, November 20, 2010

DNS Bind on Red Hat Linux Enterprise 5

#yum -y install bind-9.x.x.x
#cd /usr/share/doc/bind-9.3.6/sample/etc
#cp -v * /etc/
#cd /usr/share/doc/bind-9.3.6/sample/var/named
#cp -rv * /var/named/
#service named start (result will be FAILED)
#vim /etc/named.conf (Please delete from line "// All BIND 9 zones are in a "view", which allow different zones to be served") And your named.conf will look like below:


//
// Sample named.conf BIND DNS server 'named' configuration file
// for the Red Hat BIND distribution.
//
// See the BIND Administrator's Reference Manual (ARM) for details, in:
//   file:///usr/share/doc/bind-*/arm/Bv9ARM.html
// Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
// its manual.
//
options
{
        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        // Put files that named is allowed to write in the data/ directory:
        directory "/var/named"; // the default
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";

};
logging
{
/*      If you want to enable debugging, eg. using the 'rndc trace' command,
 *      named will try to write the 'named.run' file in the $directory (/var/named).
 *      By default, SELinux policy does not allow named to modify the /var/named directory,
 *      so put the default debug log file in data/ :
 */
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
#service named start     ( [ OK ] )

No comments: