Oracle Rac修改IP地址

1 备份CRS环境 root用户下执行

         cd /u01

         tar –cvf app.tar app

2 更改CRS配置

        cd /u01/app/11.2.0/grid/bin

         grid@prdweb1:/u01/app/11.2.0/grid/bin$oifcfg iflist

eth1  168.160.60.0

eth2  10.11.11.0

eth2  169.254.0.0

eth3  10.11.12.0

eth3  169.254.64.0

eth6  10.11.13.0

eth6  169.254.128.0

eth7  10.11.14.0

eth7  169.254.192.0

bond0  192.168.15.0

         ./oifcfg delif –globaleth1/168.160.60.0

         ./oifcfg delif –globalbond0/192.168.15.0

         ./oifcfg setif –global bond0/168.160.60.0

        

3 更改操作系统设置

3.1 更改/etc/hosts中节点1的IP地址列表

#bon0 Public Network

#eth0-4 Public Network

168.160.60.88   prdweb1

168.160.60.91   prdweb2

#Public Virtual IP (VIP) addresses

168.160.60.89   prdweb1-vip

168.160.60.92   prdweb2-vip

#SCAN For Oracle Cluster

168.160.60.90  prdweb-cluster-scan

3.2 完成节点1到节点2的互信验证,从节点2ssh hosts中的域名prdweb1

3.3 更改/etc/sysconfig/network-scripts/中的文件,更改IP地址。

3.4 联系网络组进行跳线,之后 servicenetwork restart

4 更改VIP资源

4.1 查看当前VIP配置

         srvctl config nodeapps -a

         grid@prdweb1:/u01/app/11.2.0/grid/bin$srvctl confignodeapps -a

Networkexists: 1/192.168.15.0/255.255.255.0/bond0, type static

VIPexists: /prdweb1-vip/192.168.15.89/192.168.15.0/255.255.255.0/bond0, hostingnode prdweb1

VIPexists: /prdweb2-vip/192.168.15.92/192.168.15.0/255.255.255.0/bond0, hostingnode prdweb2

 

crsctl stat res –t 应该显示VIP在线

4.2 停掉VIP资源 grid 用户执行

$ srvctl stop instance -d prdweb -i prdweb1
$ srvctl stop vip -n prdweb1 -f

crs_stat –t

4.3 更改VIP root用户执行

         srvctl modify nodeapps -n prdweb1 -A prdweb1-vip/255.255.255.0/bond0

         srvctl config nodeapps –a

4.4 重启资源 grid用户执行

$ srvctl start vip -n prdweb1 
$ srvctl start listener -n prdweb1
$ srvctl start instance -d prdweb -n prdweb1

crs_stat –t –v

5 重复以上步骤更改2节点

6 更改scan-ip

6.1 查看状态,root用户执行

         srvctl config scan

6.2 停止监听和scan,root用户执行

         srvctl stop scan_listener

         srvctl stop scan

6.3 重新配置scan-ip root用户执行

         srvctl modify scan –n prdweb-cluster-scan

         srvctl config scan

6.4 重启scan和scan监听 root用户执行

         srvctl start scan

         srvctl start scan_listener

6.5 如果scan IP的数目发生辩护,执行以下更新:

         srvctl modify scan_listener -u



详细参见文档276434.1 

猜你喜欢

转载自blog.csdn.net/gaobudong1234/article/details/80227144