日期:2014-05-16 浏览次数:20780 次
11G RAC scan即用DNA解析的IP地址,oracle推荐配置3个,这样可以起到均衡负载和冗余的作用.
系统情况: rac01,rac02
操作系统平台:red hat enterprise 5.4 2台虚拟机
这里 我们需要配置一个scan为 rac-scan的域名解析
配置步骤如下:
1. 我们设置rac01为DNS服务器
[root@rac01 etc]# ifconfig
eth0????? Link encap:Ethernet? HWaddr 00:0C:29:B5:38:5E?
????????? inet addr:192.168.0.18? Bcast:192.168.0.255? Mask:255.255.255.0
????????? inet6 addr: fe80::20c:29ff:feb5:385e/64 Scope:Link
????????? UP BROADCAST RUNNING MULTICAST? MTU:1500? Metric:1
????????? RX packets:2332291 errors:0 dropped:0 overruns:0 frame:0
????????? TX packets:1535201 errors:0 dropped:0 overruns:0 carrier:0
????????? collisions:0 txqueuelen:1000
????????? RX bytes:2347536563 (2.1 GiB)? TX bytes:1079658292 (1.0 GiB)
????????? Interrupt:185 Base address:0x1480
eth0:1??? Link encap:Ethernet? HWaddr 00:0C:29:B5:38:5E?
????????? inet addr:192.168.0.101? Bcast:192.168.0.255? Mask:255.255.255.0
????????? UP BROADCAST RUNNING MULTICAST? MTU:1500? Metric:1
????????? Interrupt:185 Base address:0x1480
eth1????? Link encap:Ethernet? HWaddr 00:0C:29:B5:38:68?
????????? inet addr:10.10.10.1? Bcast:10.10.10.255? Mask:255.255.255.0
????????? inet6 addr: fe80::20c:29ff:feb5:3868/64 Scope:Link
????????? UP BROADCAST RUNNING MULTICAST? MTU:1500? Metric:1
????????? RX packets:39950 errors:0 dropped:0 overruns:0 frame:0
????????? TX packets:61611 errors:0 dropped:0 overruns:0 carrier:0
????????? collisions:0 txqueuelen:1000
????????? RX bytes:15381230 (14.6 MiB)? TX bytes:46112067 (43.9 MiB)
????????? Interrupt:193 Base address:0x1800
lo??????? Link encap:Local Loopback?
????????? inet addr:127.0.0.1? Mask:255.0.0.0
????????? inet6 addr: ::1/128 Scope:Host
????????? UP LOOPBACK RUNNING? MTU:16436? Metric:1
????????? RX packets:54304 errors:0 dropped:0 overruns:0 frame:0
????????? TX packets:54304 errors:0 dropped:0 overruns:0 carrier:0
????????? collisions:0 txqueuelen:0
????????? RX bytes:10332630 (9.8 MiB)? TX bytes:10332630 (9.8 MiB)
?
从以上可以看出rac01的IP地址为:192.168.0.1
然后?配置 DNS named.conf 文件?
[root@rac01 named]# vi /var/named/chroot/etc/named.conf
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";
???? query-source port 53;
???? query-source-v6 port 53;
???? allow-query { any; };
};
zone "." IN {
??? type hint;
??? file "named.ca";
};
zone "testenv.com" IN {
????? type master;
????? file "testenv.com.zone";
????? allow-update { none; };
};
zone "0.168.192.in-addr.arpa." IN {
?????? type master;
?????? file "0.168.192.in-addr.arpa.zone";
?????? allow-update { none; };
};
"/var/named/chroot/etc/named.conf" 29L, 697C
[root@rac01 etc]# dig? -t NS .
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> -t NS .
;; global options:? printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14850
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 14
;; QUESTION SECTION:
;.????????????????????????????? IN????? NS
;; ANSWER SECTION:
.?????????????????????? 513716? IN????? NS????? e.root-servers.net.
.?????????????????????? 513716? IN????? NS????? f.root-servers.net.
.?????????????????????? 513716? IN????? NS????? g.root-servers.net.
.?????????????????????? 513716? IN????? NS????? h.root-servers.net.
.?????????????????????? 513716? IN????? NS????? i.root-servers.net.
.?????????????????????? 513716? IN????? NS????? j.root-servers.net.
.?????????????????????? 513