Fix default BIND install on CentOS

在安装ORACLE RAC的时候碰到DNS配置问题,看了DNS & BIND之后,小配了一下,一大堆BIND配置错误,网上有一哥们,估计是老外,碰到的问题差不多,摘录下:http://itcaffe.net/fix-default-bind-install-on-centos/


1。 Locating /var/named/chroot//etc/named.conf failed:

一开始这个问题很相似,看了DNS & BIND之后,有点名目了,BIND需要配置named.conf和2类zone data file:

a)     named.conf是named也就是DNS需要读取的配置文件,通常在/etc/named.conf, 也可以是在/var/named/chroot/etc/named.conf

b)      第一类zone data file 是name mapped to address,也就是forward-mapping file,根据名字翻译IP地址;

c)       第二类zone data file  是address mapped to name, 也就是reverse mapping file,根据地址找名字


2.   named.conf 配置

      options {
                directory "/var/named";
        };

zone "smartoffice.com" in {

                                type master;
                                file "db.smartoffice.com";
                          };

             zone "226.168.192.in-addr.arpa" in {
                                        type master;
                                        file "db.192.168.226";
};

     --  zone data file   (Address mapped to NAMES)

     226.168.192.in-addr.arpa.       IN SOA rac01.smartoffice.com rac02.smartoffice.com(
        1       ;serial
        3h      ;refresh after 3 hours
        1h      ;retry after 1 hour
        1w      ;expire after 1 week
        1h)     ;negative caching TTL of 1 hour
;
;NS Records
;
226.168.192.in-addr.arpa. IN NS rac01.smartoffice.com

;

     --  zone data file (Names mapped to Addresses)

     smartoffice.com.  IN SOA rac01.smartoffice.com. rac02.smartoffice.com.(
        1       ;serial
        3h      ;refersh after 3 hours
        1h      ;retry after 1 hour
        1w      ;expire after 1 week
        1h)     ;negative caching TTL of 1 hour

;
;NS Records:
;
smartoffice.com. IN NS rac01.smartoffice.com.
smartoffice.com. IN NS rac02.smartoffice.com.

;
;Host Addresses
;
localhost.smartoffice.com.      IN A    127.0.0.1
rac01.smartoffice.com.          IN A    192.168.226.146
rac02.smartoffice.com.          IN A    192.168.226.149
;
;multi-home hosts
;none

;host addresses:
;
146.226.168.192.in-addr.arpa.   IN PTR  rac01.smartoffice.com
149.226.168.192.in-addr.arpa.   IN PTR  rac02.smartoffice.com


3    从上面的配置文件,看得出来,

3.1  ;冒号是代表注释(在zone data file中),

3.2  基本的zone data file 格式:

        SOA Record

        NS Record

        Other Records

                         A :   name  to address mapping (名字翻译地址)

                         PTR:(POINTER)  address to name mapping(地址翻译名字)

                         CNAME:  别名


     

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值