zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Python基础——内置函数
    HHKB Mac快捷键使用
    解决EditText在ListView Item中,第一次点击无法获取焦点问题
    Android 设置Spinner默认显示文字
    IOS-静态Cell
    android-创建流式布局,并修改最后一行的最后一个view
    最简单的设置ExitText只能输入数字和字母的方法
    Android studio私人常用快捷键(持续更新)
    IOS-NSNotification(通知)
    Android书单(持续更新)
  • 原文地址:https://www.cnblogs.com/hengwei/p/10122120.html
Copyright © 2011-2022 走看看