Oracle12.2 RAC集群管理修改IP地址(DNS解析)

Oracle12.2 RAC集群管理之修改IP地址

该章节实验是基于此章节基础上操作:
Oracle LinuxR7安装Oracle 12.2 RAC集群实施(DNS解析)-CSDN博客

环境

改前IP:
172.30.21.101   hefei1   hefei1.hefeidb.com
172.30.21.102   hefei2   hefei2.hefeidb.com
10.10.1.101  hefei1prv     hefei1prv.hefeidb.com
10.10.1.102  hefei2prv     hefei2prv.hefeidb.com
172.30.21.103   hefei1vip    hefei1vip.hefeidb.com
172.30.21.104   hefei2vip     hefei2vip.hefeidb.com
172.30.21.105   hefeiscan     hefeiscan.hefeidb.com
172.30.21.106   hefeiscan     hefeiscan.hefeidb.com
172.30.21.107   hefeiscan     hefeiscan.hefeidb.com
172.30.21.112 hefeidns  hefeidb.com  hefeidns.hefeidb.com

改后IP:
172.30.21.121  hefei1  hefei1.hefeidb.com
172.30.21.122  hefei2  hefei2.hefeidb.com
10.10.1.101 hefei1prv   hefei1prv.hefeidb.com
10.10.1.102 hefei2prv   hefei2prv.hefeidb.com
172.30.21.123  hefei1vip  hefei1vip.hefeidb.com
172.30.21.124  hefei2vip   hefei2vip.hefeidb.com
172.30.21.125  hefeiscan   hefeiscan.hefeidb.com
172.30.21.126  hefeiscan   hefeiscan.hefeidb.com
172.30.21.127  hefeiscan   hefeiscan.hefeidb.com
172.30.21.112 hefeidns hefeidb.com hefeidns.hefeidb.com

停止RAC

先停数据库停监听

[grid@hefei1:/home/grid]$srvctl stop database -d hefeidb -o immediate

[grid@hefei1:/home/grid]$srvctl stop listener

再停crs集群

[root@hefei1 ~]# crsctl stop crs

[root@hefei2 ~]# crsctl stop crs

配置/etc/hosts文件

先不要修改私网IP,后面再修改

[root@hefei1 ~]# vi /etc/hosts

[root@hefei2 ~]# vi /etc/hosts

sql 复制代码
172.30.21.121  hefei1  hefei1.hefeidb.com
172.30.21.122  hefei2  hefei2.hefeidb.com
10.10.1.101 hefei1prv   hefei1prv.hefeidb.com
10.10.1.102 hefei2prv   hefei2prv.hefeidb.com
172.30.21.123  hefei1vip  hefei1vip.hefeidb.com
172.30.21.124  hefei2vip   hefei2vip.hefeidb.com
172.30.21.125  hefeiscan   hefeiscan.hefeidb.com
172.30.21.126  hefeiscan   hefeiscan.hefeidb.com
172.30.21.127  hefeiscan   hefeiscan.hefeidb.com
172.30.21.112 hefeidns hefeidb.com hefeidns.hefeidb.com

修改主机的IP地址

只修改public IP,开始不能修改私网IP

[root@hefei1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

[root@hefei2 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

[root@hefei1 ~]# service network restart

[root@hefei2 ~]# service network restart

重新连接

配置DNS

测试dns客户端

清理DNS

修改public ip-vip ip-scan

修改pubilc ip

su - root

crsctl start crs

ctsctl check crs

crs_stat -t

root 用户查看并修改共享盘网络配置:

oifcfg getif

删除旧值并设定新值

oifcfg delif -global enp0s3

oifcfg setif -global enp0s3/172.30.21.0:public

修改vip ip

vip 地址没有修改

[root@hefei1 ~]# srvctl config vip -n hefei1

[root@hefei1 ~]# srvctl config vip -n hefei2

--如果没有自动变成新的ip ,需要以下操作 --【都在一个节点1执行】

srvctl stop listener -n hefei1

srvctl stop listener -n hefei2

srvctl stop vip -n hefei1 --[报错:srvctl stop vip -n hefei1 -force]

srvctl stop vip -n hefei2

修改 VIP 设置:

srvctl modify nodeapps -n hefei1 -A 172.30.21.123/255.255.255.0/enp0s3

srvctl modify nodeapps -n hefei2 -A 172.30.21.124/255.255.255.0/enp0s3

srvctl start vip -n hefei1

srvctl start vip -n hefei2

srvctl start listener -n hefei1

srvctl start listener -n hefei2

再次验证 VIP 修改完成:

修改scan ip

su -root

srvctl config scan

srvctl modify scan -scanname hefeiscan.hefeidb.com


修改private ip

--crs集群是打开的

olsnodes -s

oifcfg getif

--相同的网段不用修改


修改网卡ip地址及hosts的地址

[root@hefei1 ~]# vi /etc/hosts

[root@hefei2 ~]# vi /etc/hosts

[root@hefei1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8

[root@hefei2 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8

速度要快,不然集群会down,重启网卡service network restart

重启主机

[root@hefei1 ~]# crsctl stop crs

[root@hefei2~]# crsctl stop crs

reboot

Oracle 修改private ip及相关测试

启动数据库[root@hefei2 ~]# srvctl start database -d hefeidb

相关推荐
大丈夫立于天地间1 小时前
机遇、挑战与融合创新之路
网络
青旋.1 小时前
数据链路层——以太网协议
网络·网络协议·tcp/ip
月光技术杂谈3 小时前
OSI&5G&WIFI&自组网协议层次对比
tcp/ip·5g·wifi·osi·自组网·七层模式·协议架构
东锋1.33 小时前
计算机网络中常用的端口号以及对应的应用程序
网络
IpdataCloud3 小时前
如何提升IP地址查询数据服务的安全?
网络·tcp/ip·安全
互联网资讯4 小时前
详解共享WiFi小程序怎么弄!
大数据·运维·网络·人工智能·小程序·生活
可涵不会debug5 小时前
【C++】在线五子棋对战项目网页版
linux·服务器·网络·c++·git
RayTz6 小时前
STM32-CAN总线
网络·stm32·嵌入式硬件
贾贾20236 小时前
配电自动化中的进线监控技术
大数据·运维·网络·自动化·能源·制造·信息与通信
我想学LINUX7 小时前
【2024年华为OD机试】(C/D卷,200分)- 5G网络建设 (JavaScript&Java & Python&C/C++)
java·c语言·javascript·网络·python·5g·华为od