zoukankan      html  css  js  c++  java
  • bind 安装 和配置(master/slave)

    一,软件安装

    #sudo yum -y install bind

    二,配置

    # vi /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.
    //
    acl "DNS-int" { 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; };
    options {
            allow-query { any; };
            allow-recursion { any; };
            allow-transfer { "localhost"; "DNS-int"; };
            also-notify { 10.10.253.1; };
            listen-on { any; };
            directory       "/var/named";
            dump-file       "/var/named/data/cache_dump.db";
            hostname none;
            minimal-responses no;
            notify yes;
            recursion yes;
            version "";
     
    #       /* Path to ISC DLV key */
    #       bindkeys-file "/etc/named.iscdlv.key";
    #       managed-keys-directory "/var/named/dynamic";
    };
    logging {
            channel simple_debug {
                    file "/var/log/named/bind.log" versions 3 size 5m;
                    severity warning;
                    print-time yes;
                    print-severity yes;
                    print-category yes;
            };
    #       category default{
    #               simple_log;
    #       };
    };
    zone "0.0.127.IN-ADDR.ARPA" in { type master; file "data/db.127.0.0"; };
    zone "internal.weimob.com" in { type master; file "data/db.weimob"; };
     
    zone "." IN {
            type hint;
            file "named.ca";
    };

    #  vi /var/named/data/db.weimob

    $ORIGIN .
    $TTL 3600       ; 1 hour
    internal.weimob.com             IN SOA  ns1.internal.weimob.com. jianzhong.xu.internal.weimob.com. (
                                    2016072809  ; serial
                                    10800      ; refresh (3 hours)
                                    3600       ; retry (1 hour)
                                    1209600    ; expire (2 weeks)
                                    3600       ; minimum (1 hour)
                                    )
    $TTL 86400      ; 1 day
                            NS      ns1.internal.weimob.com.
    $TTL 3600       ; 1 hour
    $ORIGIN internal.weimob.com.
    ns1                     A       10.10.252.73

    # /etc/init.d/named start

    SLAVE安装和配置

    #软件安装

    #sudo yum -y install bind

    #vi /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.
    //
    acl "DNS-int" { 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; };
    options {
            allow-query { any; };
            allow-recursion { any; };
            allow-transfer { "localhost"; "DNS-int"; };
            listen-on { any; };
            directory       "/var/named";
            dump-file       "/var/named/data/cache_dump.db";
            hostname none;
            minimal-responses no;
            notify yes;
            recursion yes;
            version "";
     
    #       /* Path to ISC DLV key */
    #       bindkeys-file "/etc/named.iscdlv.key";
    #       managed-keys-directory "/var/named/dynamic";
    };
    logging {
            channel simple_debug {
                    file "/var/log/named/bind.log" versions 3 size 5m;
                    severity warning;
                    print-time yes;
                    print-severity yes;
                    print-category yes;
            };
    #       category default{
    #               simple_log;
    #       };
    };
    zone "0.0.127.IN-ADDR.ARPA" in { type slave; masters { 10.10.252.73; }; file "data/db.127.0.0"; };
    zone "internal.weimob.com" in { type slave; masters { 10.10.252.73; }; file "data/db.weimob"; };
     
    zone "." IN {
            type hint;
            file "named.ca";
    };
     

    # vi /var/named/data/db.weimob

    $ORIGIN .
    $TTL 3600       ; 1 hour
    internal.weimob.com     IN SOA  ns1.internal.weimob.com. jianzhong.xu.internal.weimob.com. (
                                    2016072809 ; serial
                                    10800      ; refresh (3 hours)
                                    3600       ; retry (1 hour)
                                    1209600    ; expire (2 weeks)
                                    3600       ; minimum (1 hour)
                                    )
    $TTL 86400      ; 1 day
                            NS      ns1.internal.weimob.com.
    $ORIGIN internal.weimob.com.
    $TTL 3600       ; 1 hour

    #/etc/init.d/named start

  • 相关阅读:
    面试题:使用存储过程造10w条测试数据,数据库插入10w条不同数据
    面试题:如何造10w条测试数据,在数据库插入10w条不同数据
    httprunner 2.x学习9-生成测试报告ExtentReport('dict object' has no attribute 'meta_data'问题已解决)
    httprunner 2.x学习8-参数化(引用 debugtalk 函数)
    httprunner 2.x学习7-参数化(引用外部csv数据)
    httprunner 2.x学习6-参数化与数据驱动
    httprunner 2.x学习5-测试用例集(testsuite)
    httprunner 2.x学习4-测试用例分层
    启动Hadoop HA Hbase zookeeper spark
    如何运行Spark程序
  • 原文地址:https://www.cnblogs.com/Qing-840/p/9285662.html
Copyright © 2011-2022 走看看