十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
这篇文章主要介绍“怎么修改linux中rac集群各种ip地址”,在日常操作中,相信很多人在怎么修改linux中rac集群各种ip地址问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么修改linux中rac集群各种ip地址”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
成都创新互联网络公司拥有十多年的成都网站开发建设经验,近千家客户的共同信赖。提供网站设计制作、成都网站制作、网站开发、网站定制、友情链接、建网站、网站搭建、成都响应式网站建设公司、网页设计师打造企业风格,提供周到的售前咨询和贴心的售后服务修改ip地址:
1.查看接口配置并修改:
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg getif
enp0s3 192.168.6.0 global public 公网ip网段
enp0s8 10.10.10.0 global cluster_interconnect 私网ip网段
删除原公有,私有IP地址:
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg delif -global enp0s3
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg delif -global enp0s8
重新设置新Public IP:
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg setif -global enp0s3/192.168.60.0:public
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg setif -global enp0s8/10.10.20.0:cluster_inerconnect
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/oifcfg getif
2.停止has服务:
/oracle/app/11.2.0/grid/bin/crsctl stop has
3.通过操作系统命令修改公有,私有IP地址
linux: vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
systemctl restart network
修改SCAN域名配置(存在DNS域名方式解析,修改域名映射)
修改hosts文件公共IP地址,VIP地址,SCAN地址
vi /etc/hosts
4.启动has:
/oracle/app/11.2.0/grid/bin/crsctl start has
5.查看和修改网络资源
/oracle/app/11.2.0/grid/bin/srvctl config network
Network exists: 1/192.168.6.0/255.255.255.0/enp0s3, type static
/oracle/app/11.2.0/grid/bin/srvctl modify network -k 1 -S 192.168.60.0/255.255.255.0/enp0s3 -v
6.重新配置SCAN VIP和SCAN Listener
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.6.0/255.255.255.0/enp0s3
SCAN VIP name: scan1, IP: /rac-scan/192.168.6.254
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl stop scan_listener
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl stop scan
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl remove scan_listener
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl remove scan
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl add scan -n scan(新的scan名称) -k 1 -S 192.168.60.0/255.255.255.0/enp0s3
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl add scan_listener
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl start scan
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl start scan_listener
7.重新配置vip
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config vip -n rac1
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config vip -n rac2
VIP exists: /rac1-vip/192.168.6.102/192.168.6.0/255.255.255.0/enp0s3, hosting node rac1
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/crsctl stop resource ora.rac1.vip -f
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/crsctl stop resource ora.rac2.vip -f
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl modify nodeapps -A 192.168.60.101/255.255.255.0/enp0s3 -n rac1
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl modify nodeapps -A 192.168.60.201/255.255.255.0/enp0s3 -n rac2
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/crsctl start resource ora.rac1.vip -f
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/crsctl start resource ora.rac2.vip -f
ps:–crsctl eval stop resource ora.cdbrac.db -unsupported(划重点12c的变化,eval是模拟命令)Doc ID 1966448.1
8.启动本地监听
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl start listener -n rac1
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl start listener -n rac2
9.修改数据库实例参数
alter system set local_listener=’(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.60.101)(PORT=1521))))’ scope=both sid=‘prod1’;
alter system set local_listener=’(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.60.201)(PORT=1521))))’ scope=both sid=‘prod2’;
alter system register;
10.检查资源状态
ifconfig
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config scan
[root@rac1 ~]# /oracle/app/11.2.0/grid/bin/srvctl config scan_listener
gridlrlgridlsnrctl status listener_scan1
grid$crsctl status res –t
到此,关于“怎么修改linux中rac集群各种ip地址”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联-成都网站建设公司网站,小编会继续努力为大家带来更多实用的文章!