修改RAC的IP

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:26

[backcolor=inherit]1. 关闭数据库
[backcolor=inherit][root@rac01 ~]# srvctl stop database -d oracle

[backcolor=inherit]2. 关闭ASM
[backcolor=inherit][root@rac01 ~]# srvctl stop asm -n rac01
[backcolor=inherit][root@rac01 ~]# srvctl stop asm -n rac02

[backcolor=inherit]3. 关闭nodeapps
[backcolor=inherit][root@rac01 ~]# srvctl stop nodeapps -n rac01
[backcolor=inherit][root@rac01 ~]# srvctl stop nodeapps -n rac02

[backcolor=inherit]4. 操作系统层关闭 crs
[backcolor=inherit][root@rac01 ~]# /etc/init.d/init.crs stop
[backcolor=inherit][root@rac02 ~]# /etc/init.d/init.crs stop

[backcolor=inherit]5. 修改 /etc/hosts 文件

[backcolor=inherit]6. 修改 ifcfg-eth0, ifcfg-eth1 地址

[backcolor=inherit]7. 在两个节点分布启动 crs
[backcolor=inherit][root@rac01 ~]# /etc/init.d/init.crs start
[backcolor=inherit][root@rac02 ~]# /etc/init.d/init.crs start

[backcolor=inherit]8. 因为ORACLE配置的是自动启动,为了修改IP,需要关闭ORACLE
[backcolor=inherit][root@rac01 ~]# srvctl stop database -d oracle
[backcolor=inherit][root@rac01 ~]# srvctl stop asm -n rac01
[backcolor=inherit][root@rac01 ~]# srvctl stop asm -n rac02
[backcolor=inherit][root@rac01 ~]# srvctl stop nodeapps -n rac01
[backcolor=inherit][root@rac01 ~]# srvctl stop nodeapps -n rac02

[backcolor=inherit]9. 查看当前网络配置
[backcolor=inherit][root@rac01 ~]# oifcfg getif -global
[backcolor=inherit]eth0 192.168.0.0 global public
[backcolor=inherit]eth1 10.10.0.0 global cluster_interconnect

[backcolor=inherit]10.删除相关网络配置
[backcolor=inherit][root@rac01 ~]# oifcfg delif -global eth0
[backcolor=inherit][root@rac01 ~]# oifcfg delif -global eth1

[backcolor=inherit]11.再次查看网络配置,此时已经没有信息
[backcolor=inherit][root@rac02 ~]# oifcfg getif -global

[backcolor=inherit]12.重新配置RAC的网络, public为公共IP的网段, cluster_interconnect为私有IP的网段
[backcolor=inherit][root@rac01 ~]# oifcfg setif -global eth0/192.168.9.0:public
[backcolor=inherit][root@rac01 ~]# oifcfg setif -global eth1/10.10.10.0:cluster_interconnect

[backcolor=inherit]13.修改VIP
[backcolor=inherit][root@rac01 ~]# ./srvctl modify nodeapps -n rac01 -A 192.168.9.155/255.255.240.0/eth0
[backcolor=inherit][root@rac01 ~]# ./srvctl modify nodeapps -n rac02 -A 192.168.9.156/255.255.240.0/eth0

[backcolor=inherit]14.修改listener.ora与tnsnames.ora中的相应的IP地址

[backcolor=inherit]15.启动相应的服务
[backcolor=inherit][ora10g@rac01 ~]$ srvctl start nodeapps -n rac01
[backcolor=inherit][ora10g@rac01 ~]$ srvctl start nodeapps -n rac02
[backcolor=inherit][ora10g@rac01 ~]$ srvctl start asm -n rac01
[backcolor=inherit][ora10g@rac01 ~]$ srvctl start asm -n rac02
[backcolor=inherit][ora10g@rac01 ~]$ srvctl start database -d oracle

本文标签:
本文标题:修改RAC的IP
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】