IT技术互动交流平台

Redhat5.4系统下搭建DNS服务器解析负载

作者:Space丶   发布日期:2012-12-29 09:18:03

OS    Redhat 5.4

tools 

 

bind-9.3.6-4.P1.el5.i386.rpm

bind-chroot-9.3.6-4.P1.el5.i386.rpm

bind-devel-9.3.6-4.P1.el5.i386.rpm

bind-libbind-devel-9.3.6-4.P1.el5.i386.rpm

bind-libs-9.3.6-4.P1.el5.i386.rpm

bind-sdb-9.3.6-4.P1.el5.i386.rpm

bind-utils-9.3.6-4.P1.el5.i386.rpm

caching-nameserver-9.3.6-4.P1.el5.i386.rpm

以上软件包安装完成之后

 

cd /var/named/chroot/etc

 

[root@space etc]# ls

localtime  named.caching-nameserver.conf  named.rfc1912.zones  rndc.key

修改 named.caching-nameserver.conf 为
 

       statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
 
        // Those options should be used carefully because they disable port
        // randomization
           query-source    port 53;
        // query-source-v6 port 53;
 
        allow-query     { any; };
        allow-query-cache { any; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { any; };
        match-destinations { any; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};
 
在 named.rfc1912.zones 末尾添加
zone "space" IN {
        type master;
        file "space.zone";
        allow-update { none; };
};
 
 
cd /var/named/chroot/var/named
 
[root@space named]# cp named.zero space.zero
[root@space named]# cp named.local space.local
ll
[root@space named]# ll
总计 88
drwxrwx--- 2 named named 4096 2004-08-26 data
-rw-r----- 1 root  named  198 2009-07-30 localdomain.zone
-rw-r----- 1 root  named  195 2009-07-30 localhost.zone
-rw-r----- 1 root  named  427 2009-07-30 named.broadcast
-rw-r----- 1 root  named 1892 2009-07-30 named.ca
-rw-r----- 1 root  named  424 2009-07-30 named.ip6.local
-rw-r----- 1 root  named  426 2009-07-30 named.local
-rw-r----- 1 root  named  427 2009-07-30 named.zero
drwxrwx--- 2 named named 4096 2004-07-27 slaves
-rw-r----- 1 root  root   426 04-28 16:09 space.local
-rw-r----- 1 root  root   427 04-28 16:09 space.zone
修改 space.local space.zero 属组 www.it165.net
[root@space named]# chown root:named space.local space.zone
[root@space named]# ll
总计 88
drwxrwx--- 2 named named 4096 2004-08-26 data
-rw-r----- 1 root  named  198 2009-07-30 localdomain.zone
-rw-r----- 1 root  named  195 2009-07-30 localhost.zone
-rw-r----- 1 root  named  427 2009-07-30 named.broadcast
-rw-r----- 1 root  named 1892 2009-07-30 named.ca
-rw-r----- 1 root  named  424 2009-07-30 named.ip6.local
-rw-r----- 1 root  named  426 2009-07-30 named.local
-rw-r----- 1 root  named  427 2009-07-30 named.zero
drwxrwx--- 2 named named 4096 2004-07-27 slaves
-rw-r----- 1 root  named  426 04-28 16:09 space.local
-rw-r----- 1 root  named  427 04-28 16:09 space.zone
修改space.zone
[root@space named]# cat space.zone
$TTL    86400
@               IN SOA  space.com.      root.space.com. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
        IN      NS      space.com.
www     IN      A       10.0.0.10
www     IN      A       10.0.0.20
www     IN      A       10.0.0.30
配置好负载无需配置反向解析,需要时再配
[root@space named]# /etc/init.d/named start
启动 named:                                               [确定]
[root@space ~]# host www.it165.net
www.it165.net has address 10.0.0.20
www.it165.net has address 10.0.0.30
www.it165.net has address 10.0.0.10
                                                   共同学习


Tag标签: Redhat   DNS服务器  
  • 专题推荐

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规