RAC 11.2.0.3 SCAN IP 配置 二度衝擊
上一篇關於SCAN IP配置的文章受到環境限制,把DNS配置到了雙節點RAC的節點一上,這次我為DNS找了一個獨立的家,為其提供了一個獨立的伺服器,並且將SCAN IP配置了3個,和官方文件建議的一致。
步驟一,在DNS所在伺服器node3安裝DNS所需rpm包
[root@node3 ~]# yum install bind bind-chroot caching-nameserver
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 30:9.3.6-16.P1.el5 set to be updated
---> Package bind-chroot.x86_64 30:9.3.6-16.P1.el5 set to be updated
---> Package caching-nameserver.x86_64 30:9.3.6-16.P1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
bind x86_64 30:9.3.6-16.P1.el5 ole5 988 k
bind-chroot x86_64 30:9.3.6-16.P1.el5 ole5 46 k
caching-nameserver x86_64 30:9.3.6-16.P1.el5 ole5 62 k
Transaction Summary
================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 502 MB/s | 1.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : bind 1/3
Installing : bind-chroot 2/3
Installing : caching-nameserver 3/3
Installed:
bind.x86_64 30:9.3.6-16.P1.el5
bind-chroot.x86_64 30:9.3.6-16.P1.el5
caching-nameserver.x86_64 30:9.3.6-16.P1.el5
Complete!
DNS伺服器IP地址為192.168.1.176
[root@node3 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:9D:A2:9B
inet addr:192.168.1.176 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:194 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15517 (15.1 KiB) TX bytes:5028 (4.9 KiB)
伺服器作業系統為OracleLinux5.7
[root@node3 ~]# cat /etc/issue
Oracle Linux Server release 5.7
Kernel \r on an \m
步驟二,配置name.conf檔案
[root@node3 ~]# cd /var/named/chroot/etc
[root@node3 etc]# ll
total 16
-rw-r--r-- 1 root root 405 Jul 21 10:23 localtime
-rw-r----- 1 root named 1230 Jan 14 2011 named.caching-nameserver.conf
-rw-r----- 1 root named 955 Jan 14 2011 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 21 10:40 rndc.key
利用複製amed.caching-nameserver.conf的方法來生成named.conf,注意引數-p 會保留組屬root named
[root@node3 etc]# cp -p named.caching-nameserver.conf named.conf
[root@node3 etc]# pwd
/var/named/chroot/etc
將127.0.0.1 改成 any
:%s/127.0.0.1/any/g
將 localhost 改成 any
:%s/localhost/any/g
[root@node3 etc]# vi named.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 any 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 { 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 { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view any_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
[root@node3 etc]# ll
total 20
-rw-r--r-- 1 root root 405 Jul 21 10:23 localtime
-rw-r----- 1 root named 1230 Jan 14 2011 named.caching-nameserver.conf
-rw-r----- 1 root named 1188 Jul 21 10:51 named.conf
-rw-r----- 1 root named 955 Jan 14 2011 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 21 10:40 rndc.key
步驟三, 建立域
[root@node1 etc]# vi /var/named/chroot/etc/named.rfc1912.zones
在檔案末尾追加下列資訊
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa";
allow-update { none; };
};
[root@node3 etc]# cd /var/named/chroot/var/named/
[root@node3 named]# ll
total 36
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root named 198 Jan 14 2011 localdomain.zone
-rw-r----- 1 root named 195 Jan 14 2011 localhost.zone
-rw-r----- 1 root named 427 Jan 14 2011 named.broadcast
-rw-r----- 1 root named 1892 Jan 14 2011 named.ca
-rw-r----- 1 root named 424 Jan 14 2011 named.ip6.local
-rw-r----- 1 root named 426 Jan 14 2011 named.local
-rw-r----- 1 root named 427 Jan 14 2011 named.zero
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
複製named.local來生成反向zone檔案
[root@node3 named]# cp -p named.local 1.168.192.in-addr.arpa
[root@node3 named]# ll
total 40
-rw-r----- 1 root named 426 Jan 14 2011 1.168.192.in-addr.arpa
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root named 198 Jan 14 2011 localdomain.zone
-rw-r----- 1 root named 195 Jan 14 2011 localhost.zone
-rw-r----- 1 root named 427 Jan 14 2011 named.broadcast
-rw-r----- 1 root named 1892 Jan 14 2011 named.ca
-rw-r----- 1 root named 424 Jan 14 2011 named.ip6.local
-rw-r----- 1 root named 426 Jan 14 2011 named.local
-rw-r----- 1 root named 427 Jan 14 2011 named.zero
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
看看我們的scan ip在節點node1,node2的配置情況
#scan-ip
192.168.1.201 scan-cluster.localdomain scan-cluster
192.168.1.202 scan-cluster.localdomain scan-cluster
192.168.1.203 scan-cluster.localdomain scan-cluster
向正向解析資料檔案localdoamin.zone新增3個SCAN IP
[root@node3 named]# vi localdomain.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
scan-cluster IN A 192.168.1.201
IN A 192.168.1.202
IN A 192.168.1.203
在反向解析資料檔案1.168.192.in-addr.arpa新增紫色字型部分
[root@node3 named]# vi 1.168.192.in-addr.arpa
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
201 IN PTR scan-cluster.localdomain.
202 IN PTR scan-cluster.localdomain.
203 IN PTR scan-cluster.localdomain.
步驟四,測試DNS伺服器解析SCAN IP
[root@node3 named]# /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused
named is stopped
[root@node3 named]#
[root@node3 named]# /etc/init.d/named start
Starting named: [ OK ]
[root@node3 named]# /etc/init.d/named status
number of zones: 7
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
named (pid 8423) is running...
[root@node3 named]#
[root@node3 named]# ll
total 40
在節點node1 新增配置檔案
[root@node1 ~]# vi /etc/resolv.conf
search localdomain
nameserver 192.168.1.176
依此測試連線3個scan ip 地址
[root@node1 ~]# nslookup 192.168.1.201
Server: 192.168.1.176
Address: 192.168.1.176#53
201.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup 192.168.1.202
Server: 192.168.1.176
Address: 192.168.1.176#53
202.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup 192.168.1.203
Server: 192.168.1.176
Address: 192.168.1.176#53
203.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup scan-cluster
Server: 192.168.1.176
Address: 192.168.1.176#53
Name: scan-cluster.localdomain
Address: 192.168.1.202
Name: scan-cluster.localdomain
Address: 192.168.1.203
Name: scan-cluster.localdomain
Address: 192.168.1.201
在節點node2重複剛才的測試
[root@node2 ~]# vi /etc/resolv.conf
search localdomain
nameserver 192.168.1.176
[root@node2 ~]# nslookup 192.168.1.201
Server: 192.168.1.176
Address: 192.168.1.176#53
201.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup 192.168.1.202
Server: 192.168.1.176
Address: 192.168.1.176#53
202.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup 192.168.1.203
Server: 192.168.1.176
Address: 192.168.1.176#53
203.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup scan-cluster
Server: 192.168.1.176
Address: 192.168.1.176#53
Name: scan-cluster.localdomain
Address: 192.168.1.201
Name: scan-cluster.localdomain
Address: 192.168.1.202
Name: scan-cluster.localdomain
Address: 192.168.1.203
步驟一,在DNS所在伺服器node3安裝DNS所需rpm包
[root@node3 ~]# yum install bind bind-chroot caching-nameserver
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 30:9.3.6-16.P1.el5 set to be updated
---> Package bind-chroot.x86_64 30:9.3.6-16.P1.el5 set to be updated
---> Package caching-nameserver.x86_64 30:9.3.6-16.P1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
bind x86_64 30:9.3.6-16.P1.el5 ole5 988 k
bind-chroot x86_64 30:9.3.6-16.P1.el5 ole5 46 k
caching-nameserver x86_64 30:9.3.6-16.P1.el5 ole5 62 k
Transaction Summary
================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 502 MB/s | 1.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : bind 1/3
Installing : bind-chroot 2/3
Installing : caching-nameserver 3/3
Installed:
bind.x86_64 30:9.3.6-16.P1.el5
bind-chroot.x86_64 30:9.3.6-16.P1.el5
caching-nameserver.x86_64 30:9.3.6-16.P1.el5
Complete!
DNS伺服器IP地址為192.168.1.176
[root@node3 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:9D:A2:9B
inet addr:192.168.1.176 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:194 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15517 (15.1 KiB) TX bytes:5028 (4.9 KiB)
伺服器作業系統為OracleLinux5.7
[root@node3 ~]# cat /etc/issue
Oracle Linux Server release 5.7
Kernel \r on an \m
步驟二,配置name.conf檔案
[root@node3 ~]# cd /var/named/chroot/etc
[root@node3 etc]# ll
total 16
-rw-r--r-- 1 root root 405 Jul 21 10:23 localtime
-rw-r----- 1 root named 1230 Jan 14 2011 named.caching-nameserver.conf
-rw-r----- 1 root named 955 Jan 14 2011 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 21 10:40 rndc.key
利用複製amed.caching-nameserver.conf的方法來生成named.conf,注意引數-p 會保留組屬root named
[root@node3 etc]# cp -p named.caching-nameserver.conf named.conf
[root@node3 etc]# pwd
/var/named/chroot/etc
將127.0.0.1 改成 any
:%s/127.0.0.1/any/g
將 localhost 改成 any
:%s/localhost/any/g
[root@node3 etc]# vi named.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 any 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 { 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 { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view any_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
[root@node3 etc]# ll
total 20
-rw-r--r-- 1 root root 405 Jul 21 10:23 localtime
-rw-r----- 1 root named 1230 Jan 14 2011 named.caching-nameserver.conf
-rw-r----- 1 root named 1188 Jul 21 10:51 named.conf
-rw-r----- 1 root named 955 Jan 14 2011 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 21 10:40 rndc.key
步驟三, 建立域
[root@node1 etc]# vi /var/named/chroot/etc/named.rfc1912.zones
在檔案末尾追加下列資訊
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa";
allow-update { none; };
};
[root@node3 etc]# cd /var/named/chroot/var/named/
[root@node3 named]# ll
total 36
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root named 198 Jan 14 2011 localdomain.zone
-rw-r----- 1 root named 195 Jan 14 2011 localhost.zone
-rw-r----- 1 root named 427 Jan 14 2011 named.broadcast
-rw-r----- 1 root named 1892 Jan 14 2011 named.ca
-rw-r----- 1 root named 424 Jan 14 2011 named.ip6.local
-rw-r----- 1 root named 426 Jan 14 2011 named.local
-rw-r----- 1 root named 427 Jan 14 2011 named.zero
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
複製named.local來生成反向zone檔案
[root@node3 named]# cp -p named.local 1.168.192.in-addr.arpa
[root@node3 named]# ll
total 40
-rw-r----- 1 root named 426 Jan 14 2011 1.168.192.in-addr.arpa
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root named 198 Jan 14 2011 localdomain.zone
-rw-r----- 1 root named 195 Jan 14 2011 localhost.zone
-rw-r----- 1 root named 427 Jan 14 2011 named.broadcast
-rw-r----- 1 root named 1892 Jan 14 2011 named.ca
-rw-r----- 1 root named 424 Jan 14 2011 named.ip6.local
-rw-r----- 1 root named 426 Jan 14 2011 named.local
-rw-r----- 1 root named 427 Jan 14 2011 named.zero
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
看看我們的scan ip在節點node1,node2的配置情況
#scan-ip
192.168.1.201 scan-cluster.localdomain scan-cluster
192.168.1.202 scan-cluster.localdomain scan-cluster
192.168.1.203 scan-cluster.localdomain scan-cluster
向正向解析資料檔案localdoamin.zone新增3個SCAN IP
[root@node3 named]# vi localdomain.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
scan-cluster IN A 192.168.1.201
IN A 192.168.1.202
IN A 192.168.1.203
在反向解析資料檔案1.168.192.in-addr.arpa新增紫色字型部分
[root@node3 named]# vi 1.168.192.in-addr.arpa
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
201 IN PTR scan-cluster.localdomain.
202 IN PTR scan-cluster.localdomain.
203 IN PTR scan-cluster.localdomain.
步驟四,測試DNS伺服器解析SCAN IP
[root@node3 named]# /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused
named is stopped
[root@node3 named]#
[root@node3 named]# /etc/init.d/named start
Starting named: [ OK ]
[root@node3 named]# /etc/init.d/named status
number of zones: 7
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
named (pid 8423) is running...
[root@node3 named]#
[root@node3 named]# ll
total 40
在節點node1 新增配置檔案
[root@node1 ~]# vi /etc/resolv.conf
search localdomain
nameserver 192.168.1.176
依此測試連線3個scan ip 地址
[root@node1 ~]# nslookup 192.168.1.201
Server: 192.168.1.176
Address: 192.168.1.176#53
201.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup 192.168.1.202
Server: 192.168.1.176
Address: 192.168.1.176#53
202.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup 192.168.1.203
Server: 192.168.1.176
Address: 192.168.1.176#53
203.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node1 ~]# nslookup scan-cluster
Server: 192.168.1.176
Address: 192.168.1.176#53
Name: scan-cluster.localdomain
Address: 192.168.1.202
Name: scan-cluster.localdomain
Address: 192.168.1.203
Name: scan-cluster.localdomain
Address: 192.168.1.201
在節點node2重複剛才的測試
[root@node2 ~]# vi /etc/resolv.conf
search localdomain
nameserver 192.168.1.176
[root@node2 ~]# nslookup 192.168.1.201
Server: 192.168.1.176
Address: 192.168.1.176#53
201.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup 192.168.1.202
Server: 192.168.1.176
Address: 192.168.1.176#53
202.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup 192.168.1.203
Server: 192.168.1.176
Address: 192.168.1.176#53
203.1.168.192.in-addr.arpa name = scan-cluster.localdomain.
[root@node2 ~]# nslookup scan-cluster
Server: 192.168.1.176
Address: 192.168.1.176#53
Name: scan-cluster.localdomain
Address: 192.168.1.201
Name: scan-cluster.localdomain
Address: 192.168.1.202
Name: scan-cluster.localdomain
Address: 192.168.1.203
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1224102/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC重建SCAN IP
- RAC 增加SCAN IP
- RAC 11.2.0.3 修改 Public IP
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- RAC改VIP和SCAN IP
- Oracle RAC修改Scan IP,Public IP的方法Oracle
- Oracle RAC修改public, VIP, SCAN IPOracle
- rac 手動漂移scan ip vip
- RAC_網路_VIP漂移_SCAN IP
- Oracle 11g修改RAC SCAN IPOracle
- Oracle RAC修改public,private,vip scan IPOracle
- RAC 11.2.0.3 SACN與DNS配置DNS
- Oracle RAC中的Public IP, VIP和Internal IP,SCANOracle
- Oracle 11gR2 RAC修改SCAN IPOracle
- RAC中的各種IP-PUBLIC-VIP-Private-SCAN IP
- 【RAC】如何修改SCAN IP的IP地址、名稱、埠等資訊
- 11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
- Oracle 11gR2 RAC修改SCAN IP地址Oracle
- RAC_TNS故障轉移負載均衡、SCAN IP、VIP、PUBLIC IP負載
- Oracle 11g RAC 叢集 SCAN IP Listener說明Oracle
- 修改scan ip
- 新增SCAN IP
- 11gr2 rac改IP系列之三:修改SCAN IP為同網段其它IP
- oracle linux 11.2 rac grid infrastructure add scan ipOracleLinuxASTStruct
- redhat linux 11.2 rac grid infrastructure add scan ipRedhatLinuxASTStruct
- scan IP 學習
- oracle 11g rac 修改VIP、scan VIP、priv IP操作文件Oracle
- RAC 11.2.0.3 修改VIP地址
- JDBC connect SCAN IPJDBC
- 搭建Physical ADG 11.2.0.3 for RAC
- RAC 11.2.0.3 維護命令 (二)
- RAC 11.2.0.3 維護命令 (一)
- RAC 11.2.0.3 管理OLR檔案
- RAC 11.2.0.3 管理OCR檔案
- 修改grid scan ip地址
- RAC 11.2.0.3 客戶端軟體Toad連線配置 -- Mac版本客戶端Mac
- RAC 11GR3雙網段設定兩套VIP SCAN IP以及LISTENER
- scan-dns配置DNS