• CentOS 7安装chroot Named


    一 安装相关软件

    yum install bind-chroot bind -y

    二 复制生成文件

    cp -R /usr/share/doc/bind-*/sample/var/named/* /var/named/chroot/var/named/

    touch /var/named/chroot/var/named/data/cache_dump.db

    touch /var/named/chroot/var/named/data/named_stats.txt

    touch /var/named/chroot/var/named/data/named_mem_stats.txt

    touch /var/named/chroot/var/named/data/named.run

    mkdir /var/named/chroot/var/named/dynamic

    touch /var/named/chroot/var/named/dynamic/managed-keys.bind

    chmod -R 777 /var/named/chroot/var/named/data

    chmod -R 777 /var/named/chroot/var/named/dynamic

    cp -p /etc/named.conf /var/named/chroot/etc/named.conf

    三配置named.conf

    vim /var/named/chroot/etc/named.conf 

    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";
    #       recursing-file  "/var/named/data/named.recursing";
    #       secroots-file   "/var/named/data/named.secroots";
            allow-query     { any; };
            recursion yes;
            dnssec-enable yes;
            dnssec-validation yes;
    
            /* Path to ISC DLV key */
            bindkeys-file "/etc/named.iscdlv.key";
    
            managed-keys-directory "/var/named/dynamic";
    
            pid-file "/run/named/named.pid";
            session-keyfile "/run/named/session.key";
    };
    
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    
    zone "." IN {
            type hint;
            file "named.ca";
    };
    
    zone "weiheng.ink" {
        type master;
        file "weiheng.local.zone";
    };
    
    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";

    四 配置解析文件 

    vim /var/named/chroot/var/named/weiheng.local.zone

     

    $TTL 86400
    @ IN SOA weiheng.local. hostmaster.weiheng.local. (
      2       ; Serial
      604800     ; Refresh
      86400     ; Retry
      2419200    ; Expire
      604800 )   ; Minimum
    ;         Define the nameservers and the mail servers
    @ IN NS ns1.weiheng.local.
    @ IN A 127.0.0.1

    
    
    vm1              IN      A       10.1.1.2
    vm2              IN      A       10.1.1.3
    vm3              IN      A       10.1.1.4
    vm4              IN      A       10.1.1.5
    vm5              IN      A       10.1.1.6
    ns1              IN      A       10.1.1.6
    ns2              IN      A       10.1.1.5

    五 启动服务

    iptables -F

    /usr/libexec/setup-named-chroot.sh /var/named/chroot on

    systemctl start named-chroot

    systemctl enable named-chroot

    systemctl status named-chroot

  • 相关阅读:
    SAP CRM销售订单UI上的字段对应的数据库表存储字段:requested start date和end date
    SAP Fiori Elements里Drop down list的实现原理
    使用Fiori Elements创建的SAP UI5应用,如何支持编辑功能
    #开工新姿势#开启一年新征程,云社区叫你来充电啦!
    云小课 | 守护网络安全不是问题,iptables的四表五链为你开启“八卦阵”
    所见即搜,3分钟教你搭建一个服装搜索系统!
    AI辅助宫颈癌筛查技术全球居首,守护者的力量来源是?
    干货分享丨从MPG 线程模型,探讨Go语言的并发程序
    网络知识一箩筐:IP地址划分的那些知识点
    MindSpore:基于本地差分隐私的 Bandit 算法
  • 原文地址:https://www.cnblogs.com/hengwei/p/10122120.html
Copyright © 2020-2023  润新知