一,软件安装

#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

最新文章

  1. Xcode8 适配iOS10时遇见的一些问题
  2. VC++ 实现文件与应用程序关联
  3. 控制器中获取store
  4. Android 利用Service BroadcastReceiver实现小例子
  5. 多网卡 指定网卡到指定IP
  6. 必须会的SQL语句(三)插入
  7. Blog CSS
  8. asp.net中常用的几种身份验证方式
  9. macOS 中的 Rootless 机制
  10. iOS学习——键盘弹出遮挡输入框问题解决方案
  11. [JLOI2015]装备购买
  12. LeetCode之“链表”:Reverse Nodes in k-Group
  13. Jmeter连接Redis,获取Redis数据集
  14. C#窗口编程时TextBox中的换行
  15. 程序猿(媛)的葵花宝典-- 必备idea 插件plugins 提高编码效率
  16. 封装sqlhelper【一】
  17. 开源方案搭建可离线的精美矢量切片地图服务-8.mapbox 之sprite大图图标文件生成(附源码)
  18. Node.js版本管理工具 nvm
  19. 便于理解mysql内幕的各种逻辑图组
  20. Eureka的原理

热门文章

  1. RabbitMQ消息中间件的用法
  2. 「vue基础」一篇浅显易懂的 Vue 路由使用指南( Vue Router 上)
  3. .Net 获取当前周是第几周
  4. Java中如何获取一个类中泛型的实际类型
  5. .NET设计模式-观察者模式
  6. C# Newtonsoft.Json JsonSerializerSettings配置序列化操作
  7. 北理工机器人队RM视觉组学习参考汇总(持续更新中)
  8. PHP使用PhpAnalysis进行分词
  9. seq2seq模型详解及对比(CNN,RNN,Transformer)
  10. locust手机号批量注册性能测试