一客户的核心Oracle10g RAC架构的数据库要进行IP的修改,原因为目前public ip和virtual ip均是用的公网IP,因此基于安全的考虑,将这2类IP均修改为公司局域网内私网IP。
出于对客户信息的保密,因此不能将真实的IP写出来,不过我会描述清楚,若有疑问,欢迎留言指出。
IP类型 | 节点1(原IP) | 节点1(改后IP) | 节点2(原IP) | 节点2(改后IP) |
---|---|---|---|---|
Public IP | 202.85.219.x | 192.168.0.214 | 202.85.219.x | 192.168.0.215 |
Virtual IP | 202.85.219.x | 192.168.0.216 | 202.85.219.x | 192.168.0.217 |
Private IP | 192.168.0.214 | 10.0.1.8 | 192.168.0.214 | 10.0.1.9 |
本套RAC需要修改public ip,virtual ip和private ip,相比较而言,修改private ip是最简单的,因此我们先执行private ip的修改工作。
查看当前网卡信息:
[oracle@oracle3 ~]$ oifcfg getif
eth0 202.85.219.0 global public
eth1 192.168.0.0 global cluster_interconnect
使用oifcfg命令添加新的私网信息并删掉旧的私网信息使用oifcfg命令添加新的私网信息并删掉旧的私网信息
[oracle@oracle3 ~]$ oifcfg setif -global eth1/10.0.1.0:cluster_interconnect
[oracle@oracle3 ~]$ oifcfg delif -global eth1/192.168.0.0
查看修改后的私网信息
[oracle@oracle3 ~]$ oifcfg getif
eth0 202.85.219.0 global public
eth1 10.0.1.0 global cluster_interconnect ---> 已显示为被修改的subnet
关闭Oracle Clusterware Stack
oracle3:root@/oracle/product/10.2.0/crs/bin>./crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
修改/etc/hosts文件,网卡IP配置
本步需要更新/etc/hosts文件,网卡上所配置的IP地址。
启动Oracle Clusterware Stack
oracle3:root@/oracle/product/10.2.0/crs/bin>./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
至此,Oracle10g RAC Private IP地址修改完毕。