RHEL5下的DNS服務配置

來源:互聯網
上載者:User

實驗環境介紹:

1.統:Red Hat Eenterprise Linux 5.3

2.火牆iptables)關閉

3.ELINUX強制

4.伺服器的IP:192.9.100.200

5.伺服器的名字:example.com

唯寫步驟:

1.yum -y install bind*  #安裝bind包

2.yum -y install caching-nemeserver  #安裝caching-nameserver

3.rpm -qa bind*.rpm

4.rpm -qa caching-nameserver

5.cd /var/named/chroot/etc

6.cp -p named.caching-nameserver.conf named.conf  #RHEL5是預設的沒有named.conf檔案,借模版檔案自己做一份,注意cp要加上-p的參數,保持原來的擁有者不變。

7.vi named.conf #進去修改

8.vi named.rfc1912.zones   #進去修改

9.cd /var/named/chroot/var/named   #注意目錄換了哦

10.rm -f 192.9.100.local     #要刪除掉

11.rm -f example.com.zone    #要刪除掉

12.cp -p localdomain.zone  example.com.zone  #用模板自己建立一個example.com.zone

13.cp -p named.local  192.9.100.local  #同上,注意都要加-p的參數

14.vi 192.9.100.local  #進去編輯

15.vi example.com.zone  #進去編輯

16.cd //etc/resolv.conf

17.vi resolv.conf   #進去編輯  16、17步驟可以用追加操作)

#echo "nameserver 192.9.100.200" > /etc/resolv.conf

18.vi /var/named/chroot/etc/named.con  #進去編輯

19.service named start

20.nslookup

21.service named restart  #重啟下服務

聯繫我們

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