小編給大家分享一下oracle11g RAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
成都創(chuàng)新互聯(lián)主要從事成都網(wǎng)站建設、網(wǎng)站建設、網(wǎng)頁設計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務。立足成都服務黃浦,10余年網(wǎng)站建設經(jīng)驗,價格優(yōu)惠、服務專業(yè),歡迎來電咨詢建站服務:18982081108
1. IP修改規(guī)劃
| hostname | 修改前 | 修改后 |
Public-ip | Node1 | 192.168.150.11 | 192.168.114.11 |
Node2 | 192.168.150.12 | 192.168.114.12 | |
VIP | Node1 | 192.168.150.13 | 192.168.114.13 |
Node2 | 192.168.150.14 | 192.168.114.14 | |
SCAN-IP | Node1 Node2 | 192.168.150.15 | 192.168.114.15 |
192.168.150.16 | 192.168.114.16 | ||
192.168.150.17 | 192.168.114.17 | ||
Priv-ip
| Node1 | 172.168.146.101 | 172.168.146.11 |
Node2 | 172.168.146.102 | 172.168.146.12 | |
|
|
|
|
2. 修改前hosts文件
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE node1
ora.DATA.dg ora....up.type ONLINE ONLINE node1
ora....ER.lsnr ora....er.type ONLINE ONLINE node1
ora.LSNR2.lsnr ora....er.type ONLINE ONLINE node1
ora....N1.lsnr ora....er.type ONLINE ONLINE node2
ora....N2.lsnr ora....er.type ONLINE ONLINE node1
ora....N3.lsnr ora....er.type ONLINE ONLINE node1
ora.LSNR3.lsnr ora....er.type ONLINE ONLINE node1
ora.asm ora.asm.type ONLINE ONLINE node1
ora.cvu ora.cvu.type ONLINE ONLINE node1
ora.gsd ora.gsd.type ONLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE node1
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE OFFLINE
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip ora....t1.type ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE OFFLINE
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip ora....t1.type ONLINE ONLINE node2
ora.oc4j ora.oc4j.type ONLINE ONLINE node1
ora.ons ora.ons.type ONLINE ONLINE node1
ora.scan1.vip ora....ip.type ONLINE ONLINE node2
ora.scan2.vip ora....ip.type ONLINE ONLINE node1
ora.scan3.vip ora....ip.type ONLINE ONLINE node1
ora.tan.db ora....se.type ONLINE ONLINE node1
[root@node2 ~]# srvctl status database -d tan
Instance tan1 is running on node node1
Instance tan2 is running on node node2
4. 關閉數(shù)據(jù)及CRS
database -d tan
[root@node1 ~]# srvctl status database -dtan
Instance tan1 is not running on node node1
Instance tan2 is not running on node node2
[root@node1 ~]# srvctl stop listener -nnode1
[root@node1 ~]# srvctl stop listener -nnode2
[root@node1 ~]# srvctl stop vip -n node1
[root@node1 ~]# srvctl stop vip -n node2
PRCC-1017 : node2-vip was already stoppedon node2
PRCR-1005 : Resource ora.node2.vip isalready stopped
[root@node1 ~]# srvctl stop scan_listener
[root@node1 ~]# srvctl stop scan
2個節(jié)點都需要停掉CRS
with the CRSdaemon.
[root@node1 ~]# crsctl check crs
CRS-4639: Could not contact Oracle HighAvailability Services
[root@node1 ~]# crsctl check cluster
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Check failed, orcompleted with errors.
[root@node1 ~]#
[root@node1 ~]# ps -ef|grep grid
root 14062 26218 0 23:46 pts/2 00:00:00 grep grid
5. 修改2個節(jié)點hosts中的public-ip,vip,scan-ip
暫不修改Priv-ip,修改后如下:
"eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:7D:D1:29"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.114.11
NETMASK=255.255.255.0
GATEWAY=192.168.115.254
~
[root@node2 ~]# cd/etc/sysconfig/network-scripts/
[root@node2network-scripts]# vi ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=static
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.114.12
NETMASK=255.255.255.0
GATEWAY=192.168.114.254
HWADDR="00:50:56:27:B7:1A"
7. 集群啟動CRS
check crs
CRS-4638: Oracle High Availability Servicesis online
CRS-4535: Cannot communicate with ClusterReady Services
CRS-4529: Cluster Synchronization Servicesis online
CRS-4534: Cannot communicate with EventManager
等一會再看
check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[root@node1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE node1
ora.DATA.dg ora....up.type ONLINE ONLINE node1
ora....ER.lsnr ora....er.type OFFLINE OFFLINE
ora.LSNR2.lsnr ora....er.type OFFLINE OFFLINE
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
ora....N2.lsnr ora....er.type OFFLINE OFFLINE
ora....N3.lsnr ora....er.type OFFLINE OFFLINE
ora.LSNR3.lsnr ora....er.type OFFLINE OFFLINE
ora.asm ora.asm.type ONLINE ONLINE node1
ora.cvu ora.cvu.type ONLINE OFFLINE
ora.gsd ora.gsd.type ONLINE OFFLINE
ora....network ora....rk.type ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application ONLINE OFFLINE
ora.node1.ons application ONLINE OFFLINE
ora.node1.vip ora....t1.type OFFLINE OFFLINE
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application ONLINE OFFLINE
ora.node2.ons application ONLINE OFFLINE
ora.node2.vip ora....t1.type OFFLINE OFFLINE
ora.oc4j ora.oc4j.type ONLINE ONLINE node1
ora.ons ora.ons.type ONLINE OFFLINE
ora.scan1.vip ora....ip.type OFFLINE OFFLINE
ora.scan2.vip ora....ip.type OFFLINE OFFLINE
ora.scan3.vip ora....ip.type OFFLINE OFFLINE
ora.tan.db ora....se.type OFFLINE OFFLINE
8. 使用oifcfg修改public-IP
[root@node1 ~]# oifcfg getif
eth0 192.168.150.0 global public
eth2 172.168.146.0 global cluster_interconnect
[root@node1 ~]#oifcfg delif -global eth0
[root@node1 ~]#oifcfg setif -global eth0/192.168.114.0:public
[root@node1 ~]# oifcfg getif
eth2 172.168.146.0 global cluster_interconnect
eth0 192.168.114.0 global public
9. 使用srvctl修改VIP
[root@node2 ~]# srvctl stop database -d tan-o immediate
PRCC-1016 : tan was already stopped
[root@node2 ~]# srvctl config vip -n node1
VIP exists:/node1-vip/192.168.114.13/192.168.150.0/255.255.255.0/eth0, hosting node node1
[root@node2 ~]# srvctl config vip -n node2
VIP exists:/node2-vip/192.168.114.14/192.168.150.0/255.255.255.0/eth0, hosting node node2
[root@node2 ~]# srvctl stop listener -nnode1
[root@node2 ~]# srvctl stop listener -nnode2
[root@node2 ~]# srvctl stop vip -n node1
[root@node2 ~]# srvctl stop vip -n node2
[root@node2 ~]# srvctlmodify nodeapps -n node1 -A 192.168.114.13/255.255.255.0/eth0
[root@node2 ~]# srvctlmodify nodeapps -n node2 -A 192.168.114.14/255.255.255.0/eth0
[root@node2 ~]# srvctl config vip -n node1
VIP exists:/node1-vip/192.168.114.13/192.168.114.0/255.255.255.0/eth0, hosting node node1
[root@node2 ~]# srvctl config vip -n node2
VIP exists:/node2-vip/192.168.114.14/192.168.114.0/255.255.255.0/eth0, hosting node node2
10. 使用srvctl修改SCANIP
修改SCANIP
[root@node1 ~]# srvctl config scan
SCAN name: scanip, Network:1/192.168.114.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP:/scanip/192.168.150.15
SCAN VIP name: scan2, IP:/scanip/192.168.150.16
SCAN VIP name: scan3, IP:/scanip/192.168.150.17
[root@node1 ~]# srvctl stop scan_listener
[root@node1 ~]# srvctl stop scan
[root@node1 ~]# srvctlmodify scan -n scanip
注:這兒的scanip是/etc/hosts里的名字
192.168.114.15 scanip
192.168.114.16 scanip
192.168.114.17 scanip
檢查確認:
[root@node1 ~]# srvctl config scan
SCAN name: scanip, Network:1/192.168.114.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP:/scanip/192.168.114.15
SCAN VIP name: scan2, IP:/scanip/192.168.114.16
SCAN VIP name: scan3, IP:/scanip/192.168.114.17
啟動scan
[root@node1 ~]# srvctl start scan
[root@node1 ~]# srvctl start scan_listener
11. 使用oifcfg修改私有PRIV-IP
[root@node1 ~]# oifcfg getif
eth2 172.168.146.0 global cluster_interconnect
eth0 192.168.114.0 global public
是一個網(wǎng)段,這兒就不用改了,如果需要改,參考修改public-ip
修改2個節(jié)點/etc/hosts
172.168.146.11 node1-priv
172.168.146.12 node2-priv
修改2個節(jié)點eth2物理地點
"eth2"
BOOTPROTO="static"
HWADDR="00:0C:29:7D:D1:33"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=172.168.146.11
NETMASK=255.255.255.0
GATEWAY=172.168.150.1
~
[root@node2 network-scripts]# vi ifcfg-eth2
DEVICE="eth2"
BOOTPROTO="static"
HWADDR="00:50:56:3E:DF:A5"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=172.168.146.12
NETMASK=255.255.255.0
GATEWAY=172.168.150.1
12. 逐個啟動相關進程
[root@node1 ~]# srvctl start vip -n node1
[root@node1 ~]# srvctl start vip -n node2
[root@node1 ~]# srvctl start listener -nnode1
[root@node1 ~]# srvctl start listener -nnode2
[root@node2 ~]# srvctl start database -dtan
[root@node1 ~]# srvctl status database -dtan
Instance tan1 is running on node node1
Instance tan2 is running on node node2
13. 修改參數(shù)local_listener
alter system setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.114.13)(PORT=1524))))'sid='tan1';
alter system setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.114.14)(PORT=1524))))'sid='tan2';
14. 測試
SQL> conn system/oracle@tanx
已連接。
以上是“oracle11g RAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
當前題目:oracle11gRAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
網(wǎng)頁地址:http://muchs.cn/article30/pjjpso.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供外貿建站、定制網(wǎng)站、網(wǎng)站策劃、App開發(fā)、網(wǎng)站制作、響應式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)