您好,登錄后才能下訂單哦!
RAC兩臺服務器的/etc/hosts都是如下
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.130.200 hdba hdba
192.168.130.201 hdbb hdbb hdbb
192.168.130.136 hdb-cluster-scan hdb-cluster-scan
192.168.130.137 hdba-vip hdba-vip
192.168.130.138 hdbb-vip hdbb-vip
192.168.148.200 hdba-priv hdba-priv
192.168.148.201 hdbb-priv hdbb-priv
192.168.130.208 hdg hdg
A實例服務器的ip信息
[root@hdba ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 5C:B9:01:99:3A:84
inet addr:192.168.148.200 Bcast:192.168.148.255 Mask:255.255.255.0
inet6 addr: fe80::5eb9:1ff:fe99:3a84/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2783160300 errors:0 dropped:0 overruns:0 frame:0
TX packets:2925124606 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2205601483366 (2.0 TiB) TX bytes:2420649621403 (2.2 TiB)
eth0:1 Link encap:Ethernet HWaddr 5C:B9:01:99:3A:84
inet addr:169.254.221.245 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 5C:B9:01:99:3A:85
inet addr:192.168.130.200 Bcast:192.168.130.255 Mask:255.255.255.0
inet6 addr: fe80::5eb9:1ff:fe99:3a85/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7365390091 errors:0 dropped:0 overruns:0 frame:0
TX packets:8297092138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2046603688342 (1.8 TiB) TX bytes:6835745161060 (6.2 TiB)
eth2:2 Link encap:Ethernet HWaddr 5C:B9:01:99:3A:85
inet addr:192.168.130.137 Bcast:192.168.130.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
B實例服務器的ip信息
[root@hdbb ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 5C:B9:01:99:38:24
inet addr:192.168.148.201 Bcast:192.168.148.255 Mask:255.255.255.0
inet6 addr: fe80::5eb9:1ff:fe99:3824/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2925138277 errors:0 dropped:0 overruns:0 frame:0
TX packets:2783173132 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2420675528287 (2.2 TiB) TX bytes:2205594234468 (2.0 TiB)
eth0:1 Link encap:Ethernet HWaddr 5C:B9:01:99:38:24
inet addr:169.254.205.69 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 5C:B9:01:99:38:25
inet addr:192.168.130.201 Bcast:192.168.130.255 Mask:255.255.255.0
inet6 addr: fe80::5eb9:1ff:fe99:3825/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6957519128 errors:0 dropped:0 overruns:0 frame:0
TX packets:8365702494 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2024616025362 (1.8 TiB) TX bytes:7204587376017 (6.5 TiB)
eth2:1 Link encap:Ethernet HWaddr 5C:B9:01:99:38:25
inet addr:192.168.130.138 Bcast:192.168.130.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
兩臺服務器的防火墻配置都一樣,配置文件/etc/sysconfig/iptables內容如下
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
#來自心跳網卡的數據都放行
-A INPUT -i eth0 -j ACCEPT
-A INPUT -i eth0:1 -j ACCEPT
#vip和scan ip放行
#本來A實例的vip去訪問B實例,在B實例防火墻添加A實例的vip,為了使兩臺服務器的防火墻配置一樣,就把A實例和B實例的vip都放行
-A INPUT -i eth0 -s 192.168.130.200/32 -j ACCEPT
-A INPUT -i eth0 -s 192.168.130.201/32 -j ACCEPT
-A INPUT -i eth0 -s 192.168.130.137/32 -j ACCEPT
-A INPUT -i eth0 -s 192.168.130.138/32 -j ACCEPT
-A INPUT
-i eth0
-s 192.168.130.136/32 -j ACCEPT
-A INPUT
-i eth0
-s 192.168.200.11/32 -j ACCEPT
#信任IP列表,/24表示整個網段都開放,/32表示只開放這個IP
-A INPUT -s 10.10.23.0/24 -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
-A INPUT -s 172.31.210.0/24 -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
-A INPUT -s 192.168.74.0/24 -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
-A INPUT -s 192.168.128.137/32 -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
#對全部網段開放1521端口
-A INPUT -p tcp --dport 1521 -j ACCEPT
#下面兩行要放到最后,如果 放在前面會創成加入的放行不生效!
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。