当前位置: 首页 > article >正文

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

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

image-20241125155647154

测试dns客户端

image-20241125155701226

清理DNS

image-20241125155715213

修改public ip-vip ip-scan

修改pubilc ip

su - root

crsctl start crs

ctsctl check crs

crs_stat -t

image-20241125155740635
root 用户查看并修改共享盘网络配置:
oifcfg getif

image-20241125155803833

删除旧值并设定新值

oifcfg delif -global enp0s3
oifcfg setif -global enp0s3/172.30.21.0:public

image-20241125155816299

修改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 修改完成:
image-20241125155905811

修改scan ip

su -root

srvctl config scan

srvctl modify scan -scanname hefeiscan.hefeidb.com

image-20241125155928769
在这里插入图片描述

修改private ip

–crs集群是打开的

olsnodes -s

oifcfg getif

–相同的网段不用修改

image-20241125155952923
在这里插入图片描述

修改网卡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

image-20241125160054659

image-20241125160103389


http://www.kler.cn/a/418843.html

相关文章:

  • Scala中字符串
  • 【Linux-多线程】重谈地址空间+内存管理方式
  • 【IMF靶场渗透】
  • OCR实现微信截图改名
  • Kotlin的object修饰符定义类似Java的静态类/静态方法
  • SQL进阶——C++与SQL进阶实践
  • 洛谷 P1558 色板游戏(线段树)
  • 管理表空间和数据文件(二)
  • 江协科技最新OLED保姆级移植hal库
  • 阅文集团大数据面试题及参考答案
  • qt 的udp发送和接收
  • Vue SSR基础介绍与实践
  • Pycharm使用Jupyterlab报错:Jupyter command `jupyter-notebook` not found
  • 计算机毕业设计Python深度学习游戏推荐系统 Django PySpark游戏可视化 游戏数据分析 游戏爬虫 Scrapy 机器学习 人工智能 大数据毕设
  • AI 编译器学习笔记之十三 -- Pytorch 特性实现
  • [golang][MAC]Go环境搭建+VsCode配置
  • 设计模式学习[10]---迪米特法则+外观模式
  • mrRobot解题过程
  • 基于自编码器的深度回归模型:原理、实现与分析
  • Cause: java.sql.SQLException: No value specified for parameter 4
  • 【机器学习】梯度消失和梯度爆炸问题
  • pytorch中一个tensor经过多次softmax会有什么变化?
  • 【Linux课程学习】:《简易版shell实现和原理》 《哪些命令可以让子进程执行,哪些命令让shell执行(内键命令)?为什么?》
  • Matlab Simulink HDL Coder开发流程(一)— 创建HDL兼容的Simulink模型
  • 未来已来!联想推出汽车智能空间解决方案
  • PWN的简单了解