redhat6.5關於rac配置DNS的問題
Three packages must be installed on Linux for DNS Server:
On dns system edit the "/etc/named.conf" file
[root@ora4 named]# cat /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 { any; }; #必須改成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";
allow-query { any; }; #必須改成any,否則其他機器無法執行域名解析
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 "ora.com" IN {
type master;
file "ora.com.zone"; #aaaa.zone是/var/named下的反向解析檔案
allow-update { none; };
};
#zone "162.168.192.in-addr.arpa." IN {
#type master;
#file "162.168.192.in-addr.arpa";
#allow-update { none; };
#};
[root@ora4 named]#
配置反向解析檔案
[root@ora4 named]# cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
zone "162.168.192.in-addr.arpa" IN {
type master;
file "aaaa.zone"; #aaaa.zone是/var/named下的反向解析檔案
allow-update { none; };
};
[root@ora4 named]# cp -p named.localhost aaaa.zone ora.com.zone
編輯正反向解析檔案
正向解析:
[root@ora4 named]# cat ora.com.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
scan-ip IN A 192.168.162.7
scan-ip IN A 192.168.162.8
scan-ip IN A 192.168.162.9
反向解析:
[root@ora4 named]# cat aaaa.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
162.168.192.in-addr.arpa. IN NS scan-ip.ora.com.
7 IN PTR scan-ip.ora.com.
8 IN PTR scan-ip.ora.com.
9 IN PTR scan-ip.ora.com.
新增的兩個檔案必須能夠被named使用者讀寫
啟動DNS服務
[root@ora4 named]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]
測試:
正向測試
[root@ora4 named]# nslookup scan-ip.ora.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
反向測試:
[root@ora4 named]# nslookup 192.168.162.9
Server: 127.0.0.1
Address: 127.0.0.1#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora4 named]# nslookup 192.168.162.8
Server: 127.0.0.1
Address: 127.0.0.1#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora4 named]# nslookup 192.168.162.7
Server: 127.0.0.1
Address: 127.0.0.1#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
RAC節點測試:
一節點:
[root@ora1 ~]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
[root@ora1 ~]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora1 ~]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora1 ~]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
二節點:
[root@ora2 Packages]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
Name: scan-ip.ora.com
Address: 192.168.162.7
[root@ora2 Packages]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora2 Packages]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora2 Packages]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
三節點:
[root@ora3 ~]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.9
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
[root@ora3 ~]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora3 ~]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora3 ~]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
- bind (includes DNS server, named)
- bind-utils (utilities for querying DNS servers about host information)
- bind-libs (libraries used by the bind server and utils package)
You can obtain an account from the Yum Server which will install the package for you automatically.
OR
You can manually download these packages:
- bind.XXX.rpm (for example bind-9.2.4-22.el3.i386.rpm)
- bind-utils.XXX.rpm
- bind-libs.XX.rpm
On dns system edit the "/etc/named.conf" file
[root@ora4 named]# cat /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 { any; }; #必須改成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";
allow-query { any; }; #必須改成any,否則其他機器無法執行域名解析
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 "ora.com" IN {
type master;
file "ora.com.zone"; #aaaa.zone是/var/named下的反向解析檔案
allow-update { none; };
};
#zone "162.168.192.in-addr.arpa." IN {
#type master;
#file "162.168.192.in-addr.arpa";
#allow-update { none; };
#};
[root@ora4 named]#
配置反向解析檔案
[root@ora4 named]# cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
zone "162.168.192.in-addr.arpa" IN {
type master;
file "aaaa.zone"; #aaaa.zone是/var/named下的反向解析檔案
allow-update { none; };
};
[root@ora4 named]# cp -p named.localhost aaaa.zone ora.com.zone
編輯正反向解析檔案
正向解析:
[root@ora4 named]# cat ora.com.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
scan-ip IN A 192.168.162.7
scan-ip IN A 192.168.162.8
scan-ip IN A 192.168.162.9
反向解析:
[root@ora4 named]# cat aaaa.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
162.168.192.in-addr.arpa. IN NS scan-ip.ora.com.
7 IN PTR scan-ip.ora.com.
8 IN PTR scan-ip.ora.com.
9 IN PTR scan-ip.ora.com.
新增的兩個檔案必須能夠被named使用者讀寫
啟動DNS服務
[root@ora4 named]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]
測試:
正向測試
[root@ora4 named]# nslookup scan-ip.ora.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
反向測試:
[root@ora4 named]# nslookup 192.168.162.9
Server: 127.0.0.1
Address: 127.0.0.1#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora4 named]# nslookup 192.168.162.8
Server: 127.0.0.1
Address: 127.0.0.1#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora4 named]# nslookup 192.168.162.7
Server: 127.0.0.1
Address: 127.0.0.1#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
RAC節點測試:
一節點:
[root@ora1 ~]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
[root@ora1 ~]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora1 ~]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora1 ~]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
二節點:
[root@ora2 Packages]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.8
Name: scan-ip.ora.com
Address: 192.168.162.9
Name: scan-ip.ora.com
Address: 192.168.162.7
[root@ora2 Packages]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora2 Packages]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora2 Packages]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
三節點:
[root@ora3 ~]# nslookup scan-ip.ora.com
Server: 192.168.162.126
Address: 192.168.162.126#53
Name: scan-ip.ora.com
Address: 192.168.162.9
Name: scan-ip.ora.com
Address: 192.168.162.7
Name: scan-ip.ora.com
Address: 192.168.162.8
[root@ora3 ~]# nslookup 192.168.162.7
Server: 192.168.162.126
Address: 192.168.162.126#53
7.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora3 ~]# nslookup 192.168.162.8
Server: 192.168.162.126
Address: 192.168.162.126#53
8.162.168.192.in-addr.arpa name = scan-ip.ora.com.
[root@ora3 ~]# nslookup 192.168.162.9
Server: 192.168.162.126
Address: 192.168.162.126#53
9.162.168.192.in-addr.arpa name = scan-ip.ora.com.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2124791/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- redhat6.5 DNS 問題解決RedhatDNS
- 關於JdonFramework配置問題Framework
- 關於Jive安裝配置的問題
- 關於redis配置找不到問題Redis
- 關於lnmp配置laravel專案的問題?LNMPLaravel
- 關於 OneAPM Cloud Test DNS 監控的幾個重要問題CloudDNS
- RedHat6.5網路卡問題總結Redhat
- RAC 11.2.0.3 SACN與DNS配置DNS
- 搭建RAC時配置scanip的DNS環境DNS
- 配置Oracle RAC需要注意的問題Oracle
- 關於oracle11g RAC 監聽器問題Oracle
- 關於weblogic配置資料驅動的問題?Web
- 關於mes系統硬體配置問題
- 關於配置檔案中的預設值的問題
- 關於SQLServerDriver的問題SQLServer
- 關於 JavaMail 的問題JavaAI
- 關於session的問題Session
- 關於Oracle10g RAC 的開啟關閉標準步驟問題Oracle
- 關於WebSphere中配置OracleRAC資料來源的問題WebOracle
- 關於MyEclipse6.0配置SSH時遇到的問題Eclipse
- redhat6.5 配置使用centos的yum源RedhatCentOS
- [轉]RAC 安裝配置過程中的問題
- 關於開發jsp標籤的環境配置問題JS
- 關於websphere讀取war配置檔案出錯的問題Web
- 關於javascript的this指向問題JavaScript
- 關於跨域的問題跨域
- 關於bit code的問題
- 關於序列同步的問題
- 關於IP地址的問題
- 關於橋模式的問題模式
- 求救 關於parallel的問題Parallel
- 關於web start的問題Web
- 關於action的error問題Error
- 關於ADAPTER的問題APT
- 關於session的奇怪問題Session
- php關於session的問題PHPSession
- 關於diag程式的問題
- 關於SimpleJdonFrameworkTest的問題Framework