官方参考文档(metalink):
如何修改集群的公网信息(包括 VIP) (文档 ID 1674442.1)
同事在测试环境测试通过,使用如下方法。
如果有疑问,请参照上述文档,写的很详细。
1、停止相关的服务
[[email protected] ~]$ srvctl stop database -d hiatmpdb -o immediate
[[email protected] ~]$ srvctl stop instance -d hiatmpdb -n rac1
[[email protected] ~]$ srvctl stop instance -d hiatmpdb -n rac2
[[email protected] ~]$ srvctl stop vip -n rac1 -f
[[email protected] ~]$ srvctl stop vip -n rac2 -f
[email protected] ~]$ srvctl stop nodeapps -f -n rac2
[email protected] ~]$ srvctl stop nodeapps -f -n rac1
[[email protected] ~]$ srvctl stop listener
[[email protected] ~]$ srvctl stop listener
[[email protected] ~]$ srvctl stop scan_listener
[[email protected] ~]$ srvctl stop scan
[[email protected] ~]$ srvctl stop scan_listener
[[email protected] ~]$ srvctl stop scan
2、修改hosts文件,并修改ip地址(物理地址,修改完地址以后要禁用网卡,再启用才能生效)
修改/etc/hosts
修改网卡信息并重启网卡
3、改ip地址
路径为:/u01/app/11.2.0/grid/product/db_1/bin
用root执行 验证vip
./srvctl config nodeapps -a
下面两行,第一行是原来的,第二行是新的
./oifcfg delif -global eth0/10.2.156.0
./oifcfg setif -global eth0/192.168.56.0:public
4、改VIP地址
./crs_stat -t
$ ./srvctl stop instance -d hiatmpdb -n rac1
$ ./srvctl stop instance -d hiatmpdb -n rac2
$ ./srvctl stop vip -n rac1 -f
$ ./srvctl stop vip -n rac2 -f
在一个节点上执行
下面此处的ip为新的
./srvctl modify nodeapps -n rac1 -A 192.168.56.103/255.255.255.0/eth0
./srvctl modify nodeapps -n rac2 -A 192.168.56.104/255.255.255.0/eth0
5、改scanip地址
./srvctl config scan
./srvctl stop scan_listener
./srvctl stop scan
./srvctl modify scan -n 192.168.56.107
./srvctl config scan
./srvctl start scan
./srvctl start scan_listener
./srvctl modify scan_listener -u
6. 验证改变
./srvctl config nodeapps -a
7. 启动 nodeapps 和其它资源
./srvctl start vip -n rac1
./srvctl start listener -n rac1
./srvctl start instance -d hiatmpdb -n rac1
./srvctl start vip -n rac2
./srvctl start listener -n rac2
./srvctl start instance -d hiatmpdb -n rac2
做完上述修改后注意查看local_listener参数,需要修改成新的