Centos6.4 安裝bind dns 伺服器,centos6.4bind

來源:互聯網
上載者:User

Centos6.4 安裝bind dns 伺服器,centos6.4bind

一、介紹

  

  1)Centos6.4 64bit minimal

  2) bind-9.8.2-0.30.rc1.el6_6.3.x86_64

 

二、安裝

$ yum install -y bind bind-utils

 

 

三、配置

 

A)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.//options {    listen-on port 53 { 172.31.100.82; };    #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     { 172.31.100.0/24; };    recursion yes;    forward only;    forwarders { 114.114.114.114;1.2.4.8; };    dnssec-enable no;    dnssec-validation no;    // 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";};zone "moniter.com" IN {        type master;        file "moniter.com.zone";        allow-update { none; };};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";

 

B)配置dns zone檔案

$ cp -rfv /var/named/named.localhost /var/named/moniter.com.zone$ vi /var/named/moniter.com.zone$TTL 600@       IN SOA  master.moniter.com. root.master.moniter.com. (                                        0       ; serial                                        1D      ; refresh                                        1H      ; retry                                        1W      ; expire                                        3H )    ; minimum@       IN      A       172.31.100.46@       IN      NS      ns.moniter.com.        IN      MX      10      mail.moniter.com.ns      IN      A       172.31.100.82mail    IN      A       172.31.100.82www     IN      A       172.31.100.46

 

四、運行

$ /etc/init.d/named start$ chkconfig named on

 

五、檢查

$ ps aux|grep named$ netstat -ntlp|grep named$ dig www.moniter.com

 

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.