DNS從伺服器遷移(基於windows為主,linux為從實現同步)

來源:互聯網
上載者:User

標籤:dns主從   dns基於windows作為主   linux作為從   

系統內容:

              CentOS release 6.6 (Final)

              Linux 2.6.32-504.el6.x86_64

              DNS主:192.168.10.251(windows)

              DNS從:192.168.10.250(linux)

 

 

安裝bind服務

  # yum install  bind-libs  bind-utils  bind

 

編輯設定檔:

# vim /etc/named.conf

options {
listen-on port 53 { 127.0.0.1;192.168.10.251; };
# 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";
# allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";

# managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";
#include "/etc/named.root.key";

在從伺服器添加需要同步的zone

在/etc/named.rfc1912.zones檔案後面添加如下配置

zone "hepaidai.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/hepaidai.org.zone";
};


zone "langbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/langbank.org.zone";
};

zone "longbank.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/longbank.org.zone";
};

zone "zhijiaoyi.org" IN {
type slave;
masters {192.168.10.250;};
file "slaves/zhijiaoyi.org.zone";
};

 

啟用DNS主伺服器(windos)每一個zone的地區傳送

如所示

650) this.width=650;" class="confluence-embedded-image" src="http://wiki.langbank.org/download/attachments/655593/1.jpg?version=1&modificationDate=1432024275000&api=v2" alt="1.jpg?version=1&modificationDate=1432024" />

並對其他的zone進行相同的操作

重啟dsn從伺服器

# /etc/init.d/named restart


本文出自 “Linux之旅” 部落格,請務必保留此出處http://openlinuxfly.blog.51cto.com/7120723/1689210

DNS從伺服器遷移(基於windows為主,linux為從實現同步)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.