Redhat 5.8 作業系統上DNS詳細配置(DNS resolution for SCAN VIPs)
Redhat 5.8 作業系統上DNS詳細配置( DNS resolution for SCAN VIPs )
1 、準備工作
軟體包支援(bind*、caching-nameserver)
安裝執行 yum install bind* caching-nameserver
看下我已經安裝的有關包
[root@doudou named]# rpm -qa bind* caching-nameserver
bind-utils-9.3.6-20.P1.el5_8.6
bind-libs-9.3.6-20.P1.el5_8.6
bind-chroot-9.3.6-20.P1.el5_8.6
caching-nameserver-9.3.6-20.P1.el5_8.6
bind-9.3.6-20.P1.el5_8.6
開啟named服務、設定開啟啟動
/etc/init.d/named start
chkconfig named on
配置nameserver
[root@doudou named]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:06:FC:D0
inet addr:192.168.1.212 Bcast:192.168.1.255 Mask:255.255.255.0
[root@doudou named]# cat /etc/resolv.conf
nameserver 192.168.1.212
nameserver 8.8.8.8
nameserver 4.4.4.4
2 、詳細配置
檢視named.caching-nameserver.conf 在作業系統上的位置
[root@doudou named]# cd /etc/
[root@doudou etc]# ls -ln named.*
lrwxrwxrwx 1 0 25 51 04-22 16:52 named.caching-nameserver.conf -> /var/named/chroot/etc/ named.caching-nameserver.conf
lrwxrwxrwx 1 0 25 41 04-22 16:52 named.rfc1912.zones -> /var/named/chroot/etc/named.rfc1912.zones
備份並修改named.caching-nameserver.conf (備份是個人習慣) 【注意紅色字型為修改部分】
[root@doudou etc]# cd /var/named/chroot/etc/
[root@doudou etc]# cp -p named.caching-nameserver.conf named.caching-nameserver.conf_backup
[root@doudou etc]# cat named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver 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.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 127.0.0.1; }; == 》127.0.0.1改成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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { localhost; }; ==>localhost 改成any
allow-query-cache { localhost; }; ==>localhost 改成any
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; }; ==>localhost 改成any
match-destinations { localhost; }; ==>localhost 改成any
recursion yes;
include "/etc/named.rfc1912.zones";
};
備份並修改named.rfc1912.zones
[root@doudou etc]# cd /var/named/chroot/etc/
[root@doudou etc]# cp -p named.rfc1912.zones named.rfc1912.zones_backup
[root@doudou etc]# vi named.rfc1912.zones
尾部新增
zone " scan-doudou.com" IN {
type master;
file " scan-doudou.com.zone";
allow-update { none; };
};
zone " 1.168.192.in-addr.arpa" IN {
type master;
file " 1.168.192.in-addr.arpa.local";
allow-update { none; };
};
配置正向解析
[root@doudou etc]# cd /var/named/chroot/var/named/
[root@doudou named]# cp -p localhost.zone scan-doudou.com.zone
【紅色字型為新增部分】
[root@doudou named]# vi scan-doudou.com.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN NS scan-doudou.com
IN A 127.0.0.1
IN AAAA ::1
www IN A 192.168.1.25
IN A 192.168.1.211
IN A 192.168.1.212
配置方向解析
【紅色字型為新增部分】
[root@doudou named]# cp -p named.local 1.168.192.in-addr.arpa.local
[root@doudou named]# vi 1.168.192.in-addr.arpa.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
IN NS scan-doudou.com.
localhost IN A 127.0.0.1
25 IN PTR
211 IN PTR
212 IN PTR
重啟named服務
[root@doudou named]# /etc/init.d/named restart
停止 named:[確定]
啟動 named:[確定]
3 、驗證結果
[root@doudou named]# nslookup
Server: 192.168.1.212
Address: 192.168.1.212#53
Name:
Address: 192.168.1.25
Name:
Address: 192.168.1.211
Name:
Address: 192.168.1.212
[root@doudou named]# ping
PING (192.168.1.212) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.212): icmp_seq=1 ttl=64 time=0.018 ms
[root@doudou named]# ping
PING (192.168.1.211) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.211): icmp_seq=1 ttl=64 time=0.560 ms
[root@doudou named]# ping
PING (192.168.1.25) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.25): icmp_seq=1 ttl=64 time=0.061 ms
[root@doudou named]# nslookup 192.168.1.211
Server: 192.168.1.212
Address: 192.168.1.212#53
211.1.168.192.in-addr.arpa name = .
4 、DNS使用驗證
另一個機器
[root@doudou-32bit ~]# cat /etc/resolv.conf
nameserver 192.168.1.212
nameserver 8.8.8.8
nameserver 4.4.4.4
[root@doudou-32bit ~]# nslookup
Server: 192.168.1.212
Address: 192.168.1.212#53
Name:
Address: 192.168.1.212
Name:
Address: 192.168.1.25
Name:
Address: 192.168.1.211
[root@doudou-32bit ~]# ping
PING (192.168.1.211) 56(84) bytes of data.
64 bytes from doudou-32bit (192.168.1.211): icmp_seq=1 ttl=64 time=0.003 ms
[root@doudou-32bit ~]# ping
PING (192.168.1.25) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.25): icmp_seq=1 ttl=64 time=0.219 ms
[root@doudou-32bit ~]# ping
PING (192.168.1.212) 56(84) bytes of data.
64 bytes from 1.168.192.in-addr.arpa (192.168.1.212): icmp_seq=1 ttl=64 time=0.336 ms
[root@doudou-32bit ~]# nslookup 192.168.1.212
Server: 192.168.1.212
Address: 192.168.1.212#53
212.1.168.192.in-addr.arpa name = .
總結:
一個簡單的DNS搞了整整一天,但是最終還是成功了,成功還是很高興的。以後安裝RAC,需要使用DNS解析SCAN VIPs 我們就可以搞了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-759114/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- scan-dns配置DNS
- Redhat9上配置DNS(轉)RedhatDNS
- Redhat linux DNS配置指南RedhatLinuxDNS
- redhat 5 dns配置示例一RedhatDNS
- Solution for Deepin DNS resolution errorDNSError
- 重新整理WINDOWS作業系統的DNSWindows作業系統DNS
- redhat7.2 DNS配置筆記(轉)RedhatDNS筆記
- 超詳細 DNS 協議解析DNS協議
- Centos7系統配置DNS服務CentOSDNS
- dnsmasq劫持和dns教程詳細解析DNS
- DNS域名系統概述及正向解析實驗(詳細)DNS
- redhat6.5關於rac配置DNS的問題RedhatDNS
- SuSE上配置DNS客戶端方法DNS客戶端
- solaris DNS 配置DNS
- redhat linux dns反向解析示例RedhatLinuxDNS
- oracle 11gR2 scan ip (DNS模式)OracleDNS模式
- Configure the DNS Server for SCAN VIP on LinuxDNSServerLinux
- RedHat 7.6作業系統安裝Redhat作業系統
- Linux作業系統上編譯程式的方法詳細介紹Linux作業系統編譯
- 老牌智慧DNS系統wdDNS出新版,自部署DNS首選DNS
- 配置linux DNSLinuxDNS
- 配置dns和apacheDNSApache
- CENTOS下配置DNSCentOSDNS
- RHEL 5 DNS 配置DNS
- DNS配置全文(轉)DNS
- solaris的dns配置DNS
- 詳解 DNS 解析DNS
- redhat6.5 DNS 問題解決RedhatDNS
- Dns解析(上) (轉)DNS
- 電腦dns配置錯誤無法上網怎麼辦 dns配置錯誤不能上網DNS
- Temporary failure in name resolution - DNS引發的問題和思考AIDNS
- oracle 11gR2 修改 DNS 方式 SCAN IPOracleDNS
- 作業系統1—作業系統概論(上)作業系統
- linux 修改 dns 配置LinuxDNS
- Linux中DNS配置LinuxDNS
- DNS安全問題有哪些?DNS系統存在哪些安全隱患?DNS
- dns配置錯誤網頁打不開 電腦dns配置錯誤無法上網怎麼辦DNS網頁
- DNS 配置單純為轉發的DNS伺服器DNS伺服器