Oracle RAC修改Scan IP,Public IP的方法

来源:这里教程网 时间:2026-03-03 14:13:23 作者:

一、修改public ip 1、提前关闭所有实例 srvctl stop database -d XXX 2、更新ocr网络信息配置,root用户执行 oifcfg getif oifcfg delif -global eth0/127.0.0.1 oifcfg setif -global eth0/192.168.20.0:public srvctl config nodeapps -a ############################################################# [root@stuaapp01 ~]# oifcfg getif eth1  192.168.10.0  global  cluster_interconnect eth0  127.0.0.1  global  public [root@stuaapp01 ~]# oifcfg delif -global eth0/127.0.0.1 [root@stuaapp01 ~]# oifcfg setif -global eth0/192.168.20.0:public [root@stuaapp01 ~]#  [root@stuaapp01 ~]# oifcfg getif eth1  192.168.10.0  global  cluster_interconnect eth0  192.168.20.0  global  public 3、修改系统层面网络文件配置,/etc/hosts和/etc/sysconfig/network-scripts/ifcfg-eth0 按实际IP修改即可,此处不做详细说明 4、重启RAC crsctl stop crs crsctl start crs oifcfg getif oifcfg delif -global eth0/192.168.20.0 oifcfg setif -global eth0/127.0.0.1:public srvctl config nodeapps -a 二、修改VIP 1、收集当前VIP配置信息 #/u01/app/11.2.0/grid/bin/srvctl config nodeapps VIP的状态 #/u01/app/11.2.0/grid/bin/crs_stat -t 2、停止所有的资源 #/u01/app/11.2.0/grid/bin/srvctl stop instance -d oggsrc -n stuaapp01 #/u01/app/11.2.0/grid/bin/srvctl stop vip -n stuaapp01 -f 3、验证VIP现在离线,接口不再绑定到公共网络接口 #/u01/app/11.2.0/grid/bin/crs_stat -t (or $ crsctl stat res t for 11gR2) 4、修改/etc/hosts文件中的VIP  crsctl stat res ora.stuaapp01.vip -p 5、root用户,修改VIP的资源 #/u01/app/11.2.0/grid/bin/srvctl modify nodeapps -n stuaapp01 -A stuaapp01-vip/255.255.255.0/eth0 6、验证变化 #/u01/app/11.2.0/grid/bin/srvctl config nodeapps -a 7、启动资源 $ srvctl start vip -n stuaapp01 $ srvctl start listener -n stuaapp01 $ srvctl start instance -d oggsrc -n stuaapp01  三、修改SCAN ip 1、检查当前的scan ip配置信息,用root用户运行 srvctl config scan 2、停止SCAN listeners 和 SCAN,用grid用户运行 srvctl stop scan_listener srvctl stop scan 3、在/etc/hosts文件修改scan ip配置信息,两个节点都需要改 按具体要求修改,此处不做详细说明 4、刷新配置信息,用root用户运行 srvctl modify scan -n rac-scan 5、验证更改信息,用root用户运行 srvctl config scan 6、重启SCAN & SCAN listener,用grid用户运行 srvctl start scan srvctl start scan_listener 7、如果SCAN VIPs的数量发生变化,则需要更新如下信息(非必需操作) srvctl modify scan_listener -u

相关推荐