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 ![image-20241125155639137](https://i-blog.csdnimg.cn/img_convert/b5d666c90acade7da98b3db599a634c6.png) ![image-20241125155647154](https://i-blog.csdnimg.cn/img_convert/87c8645f69d0e87bd644867f9c5df082.png) #### 测试dns客户端 ![image-20241125155701226](https://i-blog.csdnimg.cn/img_convert/dd11f462ae09edef50297de1a3a68440.png) #### 清理DNS ![image-20241125155715213](https://i-blog.csdnimg.cn/img_convert/5e523ccb5f461cc7567bca353c6c90c6.png) ### 修改public ip-vip ip-scan #### 修改pubilc ip su - root crsctl start crs ctsctl check crs crs_stat -t ![image-20241125155740635](https://i-blog.csdnimg.cn/img_convert/7f6616e26a591bc5a4e1411064bc351c.png) root 用户查看并修改共享盘网络配置: oifcfg getif ![image-20241125155803833](https://i-blog.csdnimg.cn/img_convert/2aea9ac313737d04f8ff90680f31f2cc.png) ### 删除旧值并设定新值 oifcfg delif -global enp0s3 oifcfg setif -global enp0s3/172.30.21.0:public ![image-20241125155816299](https://i-blog.csdnimg.cn/img_convert/13bf83dd7c7e026633f749d1a3eb1fa3.png) #### 修改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及相关测试 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/f727936a776f46bb9637b169793bd821.png) 启动数据库\[root@hefei2 \~\]# srvctl start database -d hefeidb ![image-20241125160054659](https://i-blog.csdnimg.cn/img_convert/fb0468447fd03077da5e3328edf22e67.png) ![image-20241125160103389](https://i-blog.csdnimg.cn/img_convert/78cda6b60a81f4b69113af0e002b3e01.png)

相关推荐
光电的一只菜鸡21 分钟前
Wireshark使用教程(含安装包和安装教程)
网络·测试工具·wireshark
领世达检测V133529092491 小时前
【联网玩具】EN 18031欧盟网络安全认证
网络·en 18031
靡樊1 小时前
Socket编程UDP\TCP
网络·c++·学习·tcp/ip·udp
2501_915918411 小时前
iOS 项目怎么构建稳定性保障机制?一次系统性防错经验分享(含 KeyMob 工具应用)
websocket·网络协议·tcp/ip·http·网络安全·https·udp
2501_915909061 小时前
从零搭建到 App Store 上架:跨平台开发者使用 Appuploader与其他工具的实战经验
websocket·网络协议·tcp/ip·http·网络安全·https·udp
秋水丶秋水2 小时前
IP证书与 域名证书有什么区别?
网络·网络协议·tcp/ip
不想头秃a3 小时前
JavaEE初阶-网络编程
java·运维·服务器·网络
哈哈哈哈哈哈哈哈哈...........3 小时前
【Nginx】使用 Nginx+Lua 实现基于 IP 的访问频率限制
tcp/ip·nginx·lua
白码低代码4 小时前
质检 LIMS 系统数据防护指南 三级等保认证与金融级加密方案设计
网络·金融·lims·实验室管理系统
jz_ddk5 小时前
[zynq] Zynq Linux 环境下 AXI BRAM 控制器驱动方法详解(代码示例)
linux·运维·c语言·网络·嵌入式硬件