oracle11gRAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
小编给大家分享一下oracle11g RAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
成都创新互联主要从事成都网站建设、网站建设、网页设计、企业做网站、公司建网站等业务。立足成都服务黄浦,10余年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18982081108
1. IP修改规划
| 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. 关闭数据及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个节点都需要停掉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个节点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
是一个网段,这儿就不用改了,如果需要改,参考修改public-ip
修改2个节点/etc/hosts
172.168.146.11 node1-priv
172.168.146.12 node2-priv
修改2个节点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. 修改参数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”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!
网页标题:oracle11gRAC如何修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
转载源于:http://ybzwz.com/article/pjjpso.html