Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBook

Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBook

导读:

1.一篇oracle 19c rac安装并应用19.9 ru的文章.

2.一篇手把手一步一步教你在MacBook笔记本玩转19c RAC的文章.


为什么写这篇文章?

     随着19c越来越普遍,patch也逐步完善,银行和金融客户也在使用这个稳定的版本,我决定把公司的11g,12.1,12.2也逐步升至19c,所以就有写这篇文章的初衷,想带领大家升级先得自己对这个版本有一定的了解,不多说接下来直接干货。


1.虚拟环境准备

1.1 硬件环境与软件版本

MacBook电脑系统:macOS Big. Sur 11.6
虚拟化软件:VirtualBox 6.1
操作系统软件包:rhel-8.3-x86_64-dvd.iso
数据库基础包:Gi :LINUX.X64_193000_grid_home.zip 和 Db :LINUX.X64_193000_db_home.zip
数据库RU软件包:
Database Release Update 19.9.0.0.201020 Patch 31771877 
Grid Infrastructure Release Update 19.9.0.0.201020 Patch 31750108

1.2 创建虚拟机

1.2.1 rac1服务器环境简介
网络:内部网络+host-only网络|本地磁盘:动态60g|内存:3g
#备注:rac1配置完成后,使用rac1为模版克隆rac2和rac3,然后配置共享磁盘
1.2.2 VirtualBox安装redhat 8.3操作系统
操作系统自动安装即可(光驱选择:rhel-8.3-x86_64-dvd.iso)
网络配置
ifcfg-enp0s3 内部网络  公有网络(混杂模式:全部允许)
ifcfg-enp0s8 host-only网络 私有网络(混杂模式:全部允许)
#备注:若需连接外网,可选择 桥接模式
上传软件,使用MacBook中的终端软件,直接scp即可
scp p6880880_190000_Linux-x86-64.zip root@192.168.56.201:/tmp

2.安装前环境准备

2.1 规划

2.1.1 Oracle Rac硬件架构图

2.1.2 软件

Gi:LINUX.X64_193000_grid_home.zip
DB:LINUX.X64_193000_db_home.zip
GI ru:p31750108_190000_Linux-x86-64.zip
DB ru:p31771877_190000_Linux-x86-64.zip
Opath:p6880880_190000_Linux-x86-64.zip
Os:Red Hat Enterprise Linux release 8.3 (Ootpa)

2.1.3 网络

原则:优先双网卡/优先私有网卡万兆/避免使用169.254.*.*地址段
/etc/hosts规划如下
#3个public ip
10.0.0.101 rac1 
10.0.0.102 rac2 
10.0.0.103 rac3 
#3个vip ip
10.0.0.104 rac1vip 
10.0.0.105 rac2vip 
10.0.0.106 rac3vip 
#1个scan ip
10.0.0.107 racscanip 
#3个private ip
192.168.56.201 rac1priv 
192.168.56.202 rac2priv 
192.168.56.203 rac3priv
#若是生产请遵循以上建议,本文是测试环境以上均可忽略。

2.1.4 权限,用户,安装目录

 /usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,asmdba,asmadmin,racdba,backupdba,dgdba,kmdba oracle
 passwd oracle
 /usr/sbin/useradd -u 54331 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba grid
 passwd grid
 
 soft    ORACLE_BASE       ORACLE_HOME
 gi       /u01/app/grid     /u01/app/19.0.0/grid
 oracle   /u01/app/oracle   /u01/app/oracle/product/19.0.0/db_1

2.1.5 存储

OCR 
/dev/sdb grid:asmadmin 660 2G
/dev/sdc grid:asmadmin 660 2G     Normal 2G
/dev/sdd grid:asmadmin 660 2G
DATA 
/dev/sde grid:asmadmin 660 40G External 40G
ARCH 
/dev/sdf grid:asmadmin 660 10G External 10G

2.2 检验与配置Oracle RAC所有集群节点

2.2.1  操作系统关闭防火墙和selinux

# 优先关闭防火墙,因我们需要通过ssh到虚拟机运行检验,若有防火墙无法使用ssh,为提升效果优先关闭防火墙
# 关闭防火墙
systemctl status firewalld
systemctl start firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld
# 永久关闭selinux
cat /etc/sysconfig/selinux
SELINUX=disabled

2.2.2 硬件检验

2.2.2.1 操作系统基础环境检验

# 操作系统发行版
cat /etc/redhat-release 
# 内核版本
uname -a
# Memory total
grep MemTotal /proc/meminfo
# SWAP Total
grep SwapTotal /proc/meminfo
# tmp目录大小
df -h /tmp
# 当前内存和swap使用状态
free -g
# 共享内存大小
df -h /dev/shm
# CPU 型号,物理个数,核数,逻辑个数
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
cat /proc/cpuinfo| grep "cpu cores"| uniq
cat /proc/cpuinfo| grep "processor"| wc -l
# 节点信息收集省略

2.2.2.2 网络检验

ifconfig | grep inet
# 省略(本文为测试环境,单网卡即可,所以双网卡绑定省略)
# 真实双网卡绑定请参考: http://blog.itpub.net/26442936/viewspace-2654393/

2.2.3 操作系统配置与优化

2.2.3.1 安装rpm包(使用yum安装),软件包最低需求

bc
binutils
elfutils-libelf
elfutils-libelf-devel
fontconfig-devel
glibc
glibc-devel
ksh
libaio
libaio-devel
libXrender
libX11
libXau
libXi
libXtst
libgcc
libnsl
librdmacm
libstdc++
libstdc++-devel
libxcb
libibverbs
make
smartmontools
sysstat
ipmiutil (for Intelligent Platform Management Interface)
libnsl2 (for Oracle Database Client only)
libnsl2-devel (for Oracle Database Client only)
net-tools (for Oracle RAC and Oracle Clusterware)
nfs-utils (for Oracle ACFS)
使用脚本批量检验rpm包所需(反复运行当脚本,当无输出后,即rpm已满足安装所需)
for i in \
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel \
libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel libnsl librdmacm libstdc++ \
libstdc++-devel libxcb libibverbs make smartmontools sysstat net-tools nfs-utils smartmontools sysstat ipmiutil libnsl2 libnsl2-devel
do
rpm -q $i &>/dev/null || F="$F $i"
done ;echo $F;unset F
配置yum
# 请参考附表:centos的yum代替redhat的yum的配置方法
yum批量安装rpm包
yum install  bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel \
libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel libnsl librdmacm libstdc++ \
libstdc++-devel libxcb libibverbs make smartmontools sysstat net-tools nfs-utils smartmontools sysstat ipmiutil libnsl2 libnsl2-devel

2.2.3.2 操作系统创建软件安装组及用户(grid,oracle)

 groupadd -g 54421 oinstall
 groupadd -g 54322 dba
 groupadd -g 54323 oper
 groupadd -g 54324 backupdba
 groupadd -g 54325 dgdba
 groupadd -g 54326 kmdba
 groupadd -g 54327 asmdba
 groupadd -g 54328 asmoper
 groupadd -g 54329 asmadmin
 groupadd -g 54330 racdba
 /usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,asmdba,asmadmin,racdba,backupdba,dgdba,kmdba oracle
 passwd oracle
 /usr/sbin/useradd -u 54331 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba grid
 passwd grid

2.2.3.3 操作系统创建软件安装目录

vi /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
# Create the Oracle Inventory Directory
# To create the Oracle Inventory directory, enter the following commands as the root user:
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
# Creating the Grid Infrastructure Base Directory
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid
# Creating the Oracle Grid Infrastructure Home Directory
mkdir -p /u01/app/19.0.0/grid
chown -R grid:oinstall /u01/app/19.0.0/grid
chmod -R 775 /u01/app/19.0.0/grid
# Creating the Oracle Base Directory
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs 
# needed to ensure that dbca is able to run after the rdbms installation.
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
# Creating the Oracle RDBMS Home Directory
mkdir -p /u01/app/oracle/product/19.0.0/db_1
chown -R oracle:oinstall /u01/app/oracle/product/19.0.0/db_1
chmod -R 775 /u01/app/oracle/product/19.0.0/db_1

2.2.3.4 操作系统软件安装用户环境变量(grid,oracle)

# grid,仅显示环境变量增加部分
[grid@rac1:/home/grid]$cat .bash_profile
export PS1="[`whoami`@`hostname`:"'$PWD]$'
export JAVA_HOME=/usr/local/java; export JAVA_HOME
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=+ASM1 
export ORACLE_PATH=/u01/app/oracle/common/oracle/sql;
export ORACLE_TERM=xterm; 
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; 
export NLS_LANG=american_america.ZHS16GBK ; 
export TNS_ADMIN=$ORACLE_HOME/network/admin; 
export ORA_NLS11=$ORACLE_HOME/nls/data;
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask=022
# oracle,仅显示环境变量增加部分
[oracle@rac1:/home/oracle]$cat .bash_profile 
export PS1="[`whoami`@`hostname`:"'$PWD]$'
export JAVA_HOME=/usr/local/java;
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
export ORACLE_SID=racdb1;
export ORACLE_UNQNAME=racdb;
export ORACLE_PATH=/u01/app/common/oracle/sql;
export ORACLE_TERM=xterm; 
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS";
export NLS_LANG=american_america.ZHS16GBK ; 
export TNS_ADMIN=$ORACLE_HOME/network/admin;
export ORA_NLS11=$ORACLE_HOME/nls/data; 
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export THREADS_FLAG=native;
export TEMP=/tmp
export TMPDIR=/tmp
umask=022

2.2.3.5 操作系统用户(oracle,grid)硬性限制优化

提升用户硬性限制(Oracle、grid用户默认的硬性限制不满足GI安装和配置)
# limits.conf为PAM模板配置文件;所以应先配置PAM,即配置如下:
echo "session required pam_limits.so" >> /etc/pam.d/login
# RAC未运行之前,无法实际测量vm.nr_hugepages大小。
# 原则:Number Hugepages * Hugepagesize = minimum Memlock < RAM 
cat /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 134144000
oracle hard memlock 134144000
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
# NOTE:What is Memlock and How to Calculate the Values for Memlock (文档 ID 2511230.1)
# shell开始文件限制提升
cat /etc/profile 
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

2.2.3.6 内核参数优化

# 虚拟机内存为3G,设置kernel.shmmax=2G,SGA=1G and PGA=1G
# kernel.shmmni该参数是系统共享内存段最大个数
# kernel.shmmax该参数是一个进程共享内存段最大尺度 
# SHMMAX应略大于SGA尺寸
# kernel.shmall该参数是共享内存页面的总数
# kernel.shmall大于shmmax/PAGE_SIZE
cat /etc/sysctl.conf 
kernel.shmmni = 4096
kernel.shmmax = 2147483648
kernel.shmall = 524288
kernel.sem = 250 32000 100 128 
fs.file-max = 7553600
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
# 安装数据库实例后算出并添加此参数
vm.nr_hugepages = 待计算
# 立即生效(root)
/sbin/sysctl -p
# NOTE: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/index
# NOTE: The latest information on kernel parameter settings for Linux can be found  in My Oracle Support ExtNote:169706.1.#

2.2.3.7 内存优化

a)Oracle一直建议关闭Transparent HugePages来优化内存的使用,
# 故关闭Transparent HugePages,增加transparent_hugepage=never
cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet numa=off transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"
# 生成有效文件
grub2-mkconfig -o /boot/grub2/grub.cfg
# 重启生效
reboot
# 检查是否生效,若输出为[never]则生效
cat /sys/kernel/mm/transparent_hugepage/enabled 
always madvise [never] 
# never表示已禁用
grep AnonHugePages /proc/meminfo
AnonHugePages:         0 kB <=表示禁用
b)共享内存优化
# Redhat 7.2以后systemd-logind service引入了新的功能,用户注销时,删除所有IPC对象
# 避免用户中断时系统删除共享SGA内存,
# 导致ASM和database instance down机,故设置RemoveIPC=no
echo "RemoveIPC=no" >> /etc/systemd/logind.conf
systemctl restart systemd-logind
# ALERT: Setting RemoveIPC=yes on Redhat 7.2 and higher Crashes ASM and Database Instances as Well as Any Application That Uses a Shared Memory Segment (SHM) or Semaphores (SEM) (文档 ID 2081410.1)
# 设置共享内存
# 通过/etc/fstab设置共享内存
[root@racdb1 ~]# cat /etc/fstab 
shm /dev/shm tmpfs defaults,size=3G 0

2.2.3.8 网络服务优化

停止avahi-daemon服务
#Avahi-daemon 可能会带来网络问题和bug,尤其是对于RAC系统,Oracle建议直接关闭。
systemctl disable avahi-daemon.socket
systemctl disable avahi-daemon.service
添加NOZEROCONF=yes参数
cat /etc/sysconfig/network
NOZEROCONF=yes

2.2.3.9 操作系统使用/etc/hosts解析

# /etc/hosts解析地址如下
[oracle@racdb1 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# PUBLIC-IP
rac1 10.0.0.101
rac2 10.0.0.102
rac3 10.0.0.103
# VIP-IP
rac1vip 10.0.0.104
rac2vip 10.0.0.105
rac3vip 10.0.0.106
# SCAN-IP
racscanip 10.0.0.107
# PRIVATE-IP
rac1priv 192.168.108.201
rac2priv 192.168.108.202
rac3priv 192.168.108.203
# 优先使用/etc/hosts,故files在dns前
[root@rac1 ~]# cat  /etc/nsswitch.conf  | grep hosts
# hosts:     db files nisplus nis dns
hosts:      files dns myhostname

2.2.3.10 禁用chronyd,采用ctss同步

redhat8关闭chronyd时间同步(redhat8已淘汰ntp)
systemctl status chronyd
systemctl stop chronyd
systemctl status chronyd
systemctl disable chronyd
mv /etc/chrony.conf /etc/chrony.conf_20211220_bk

2.3 VirtualBox使用rac1为模版克隆rac2和rac3服务器

注意:
修改ip地址与mac地址
修改oracle_sid

2.4 VirtualBox创建共享磁盘与权限配置 

共享配置结果如下:
[root@rac1 ~]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda             8:0    0 60.9G  0 disk 
├─sda1          8:1    0    1G  0 part /boot
└─sda2          8:2    0 59.9G  0 part 
  ├─rhel-root 253:0    0 38.2G  0 lvm  /
  ├─rhel-swap 253:1    0    3G  0 lvm  [SWAP]
  └─rhel-home 253:2    0 18.7G  0 lvm  /home
sdb             8:16   0    2G  0 disk 
sdc             8:32   0 10.3G  0 disk 
sdd             8:48   0    2G  0 disk 
sde             8:64   0    2G  0 disk 
sdf             8:80   0 40.1G  0 disk 
udev绑定磁盘权限
--裸盘作为asm磁盘
for i in b c d e f ;
do
echo "KERNEL==\"sd?\", SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d /dev/\$name\", RESULT==\"`/usr/lib/udev/scsi_id -g -u -d /dev/sd\$i`\", SYMLINK+=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules      
done
--启动udev
/sbin/udevadm trigger --type=devices --action=change 
--udevadm配置重载生效:
udevadm control --reload
udevadm trigger
—展示绑定后结果
[root@rac1 ~]# ls -l /dev/asm*
lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskb -> sdb
lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskc -> sdc
lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskd -> sdd
lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diske -> sde
lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskf -> sdf

3.安装

3.1 gi安装

3.1.1 节点RAC1上传GI软件包并解压到$ORACLE_HOME下,仅节点rac1即可

$ORACLE_HOME=/u01/app/19.0.0/grid
su - grid
unzip -d $ORACLE_HOME /soft/LINUX.X64_193000_grid_home.zip
# 因macos环境下安装,下载的介质直接被解压成目录形式,仅把目录下的内容上传至$ORACLE_HOME下即可

3.1.2 所有节点安装cvuqdisk

[root@rac1 ~]# rpm -ivh /u01/app/19.0.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm
Verifying...                          ################################# [100%]
准备中...                          ################################# [100%]
正在升级/安装...
   1:cvuqdisk-1.0.10-1                ################################# [100%]
# 其他节点安装过程省略

3.1.3 节点rac1升级OPatch,新版本直接覆盖老版,仅节点rac1即可

[root@racdb1 soft]# chmod 775 p6880880_190000_Linux-x86-64.zip
[grid@racdb1:/home/grid]$unzip -d /u01/app/19.0.0/grid/ /soft/p6880880_190000_Linux-x86-64.zip 
Archive:  /soft/p6880880_190000_Linux-x86-64.zip
inflating: /u01/app/19.0.0/grid/OPatch/emdpatch.pl  
replace /u01/app/19.0.0/grid/OPatch/oplan/oplan [y]es, [n]o, [A]ll, [N]one, [r]ename: A
[grid@rac1:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch version
OPatch Version: 12.2.0.1.28
OPatch succeeded.

3.1.4 配置grid互信

# 解压gi软件包后,使用sshUserSetup.sh工具进行互信配置
# root用户节点1配置ssh互信,步骤如下:
# 此脚本适合多节点安装优先使用
/u01/app/19.0.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid -hosts "rac1 rac2 rac3" -advanced -noPromptPassphrase
# 检验互信,grid用户
# 节点1, grid用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date
# 节点2, grid用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date
# 节点3, grid用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date

3.1.5 gi安装前检查

export CV_ASSUME_DISTID=RHEL7
# 19c的gi base包在redhat8环境中,运行runcluvfy.sh是无结果的,所以设置export CV_ASSUME_DISTID=RHEL7是必须的
# grid用户运行runcluvfy.sh检验系统环境(先解压GI包,后才有runcluvfy.sh脚本)
[grid@rac1:/u01/app/19.0.0/grid]$./runcluvfy.sh stage -pre crsinst -n rac1,rac2,rac3 -verbose 
Verifying Physical Memory ...FAILED
rac2: PRVF-7530 : Sufficient physical memory is not available on node "rac2"
      [Required physical memory = 8GB (8388608.0KB)]
……
# 以上物理内存不足,测试环境忽略
Verifying Package: compat-libcap1-1.10 ...FAILED
rac2: PRVF-7532 : Package "compat-libcap1" is missing on node "rac2"
……
Verifying Package: gcc-c++-4.8.2 ...FAILED
rac2: PRVF-7532 : Package "gcc-c++" is missing on node "rac2"
……
Verifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...FAILED
rac2: PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node
      "rac2"
……
# 以上缺少rpm,安装即可
Verifying Node Connectivity ...FAILED
PRVG-1172 : The IP address "192.168.122.1" is on multiple interfaces "virbr0"
on nodes "rac1,rac3,rac2"
……
# virbr0网络不使用,故忽略
Verifying resolv.conf Integrity ...FAILED
rac2: PRVG-2002 : Encountered error in copying file "/etc/resolv.conf" from
      node "rac2" to node "rac1"
      protocol error: filename does not match request 
……
Verifying DNS/NIS name service ...FAILED
rac2: PRVG-2002 : Encountered error in copying file "/etc/nsswitch.conf" from
      node "rac2" to node "rac1"
      protocol error: filename does not match request 
……
Verifying User Equivalence ...FAILED
rac2: PRVF-5311 : File "/tmp/rac2.getFileInfo57728.out" either does not exist
      or is not accessible on node "rac2". 
……
# 以上均为openssh升级OpenSSH_8.0p1后问题,scp发出的命令若是双引号中单有单引号则触发bug
# 解决办法:参考(Doc ID 2555697.1)

3.1.6 图形化安装gi并应用RU

# 上传RU软件包并解压
hewenyu@hewenyudeMacBook-Pro Downloads % scp p31750108_190000_Linux-x86-64.zip grid@192.168.56.201:/home/grid
[grid@rac1:/home/grid]$unzip p31750108_190000_Linux-x86-64.zip
# grid用户图形化安装gi并应用RU
[grid@rac1:/home/grid]$unzip p31750108_190000_Linux-x86-64.zip
[grid@rac1:/home/grid]$chmod -R a+x 31750108/
[grid@rac1:/home/grid]$export CV_ASSUME_DISTID=RHEL7
[grid@rac1:/u01/app/19.0.0/grid]$./gridSetup.sh -applyPSU /home/grid/31750108/
# gridSetup.sh -applyPSU是12.2.0.1的安装gi并应用RU的方法,我在19c也运行成功了,显然是向下兼容了12.2.0.1版本。更多请参考(Doc ID 1410202.1)
# 图形化安装省略
# 节点1运行root.sh脚本,共计19步。(所有节点均需运行)
[root@rac1 ~]# /u01/app/19.0.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac1/crsconfig/rootcrs_rac1_2021-12-27_05-48-17PM.log
2021/12/27 17:48:32 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/12/27 17:48:32 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/12/27 17:48:32 CLSRSC-363: User ignored prerequisites during installation
2021/12/27 17:48:32 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/12/27 17:48:35 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/12/27 17:48:39 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2021/12/27 17:48:40 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/12/27 17:48:41 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/12/27 17:49:02 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/12/27 17:49:18 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/12/27 17:49:50 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/12/27 17:49:50 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/12/27 17:50:00 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/12/27 17:50:00 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/12/27 17:50:03 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/12/27 17:50:27 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/12/27 17:50:27 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/12/27 17:50:40 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/12/27 17:50:54 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
Redirecting to /bin/systemctl restart rsyslog.service
已成功创建并启动 ASM。
[DBT-30001] 已成功创建磁盘组。有关详细信息, 请查看 /u01/app/grid/cfgtoollogs/asmca/asmca-211227下午055129.log。
2021/12/27 17:52:31 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 6087f66c75654faabf89f43fa89ddfc9.
Successful addition of voting disk d6bf2d8b2eff4f60bf36d431d224a73c.
Successful addition of voting disk dc1625ac5a304f3ebf649efd5ea673ed.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6087f66c75654faabf89f43fa89ddfc9 (/dev/asm-diskb) [OCR]
 2. ONLINE   d6bf2d8b2eff4f60bf36d431d224a73c (/dev/asm-diskd) [OCR]
 3. ONLINE   dc1625ac5a304f3ebf649efd5ea673ed (/dev/asm-diske) [OCR]
Located 3 voting disk(s).
2021/12/27 17:54:12 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/12/27 17:55:27 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/12/27 17:55:27 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/12/27 17:57:20 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/12/27 17:57:58 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
# rac2节点运行脚本结果如下
[root@rac2 ~]# /u01/app/19.0.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/rac2/crsconfig/rootcrs_rac2_2021-12-27_06-00-23PM.log
2021/12/27 18:00:33 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/12/27 18:00:33 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/12/27 18:00:34 CLSRSC-363: User ignored prerequisites during installation
2021/12/27 18:00:34 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/12/27 18:00:39 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/12/27 18:00:39 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2021/12/27 18:00:39 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/12/27 18:00:43 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/12/27 18:00:49 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/12/27 18:00:50 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/12/27 18:01:29 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/12/27 18:01:29 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/12/27 18:01:35 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/12/27 18:01:35 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/12/27 18:02:22 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/12/27 18:02:23 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/12/27 18:02:33 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/12/27 18:02:41 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
Redirecting to /bin/systemctl restart rsyslog.service
2021/12/27 18:03:15 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/12/27 18:04:46 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/12/27 18:04:47 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/12/27 18:05:53 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/12/27 18:06:00 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/12/27 18:06:25 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
# 节点3运行脚本过程与节点2相同,故省略如下:
2021/12/27 18:14:35 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/12/27 18:15:22 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

3.1.7 gi安装成功后,集群服务与RU升级检查

[grid@rac3:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.chad
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     Started,STABLE
      2        ONLINE  ONLINE       rac2                     Started,STABLE
      3        ONLINE  ONLINE       rac3                     Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.cvu
      1        ONLINE  ONLINE       rac1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.rac3.vip
      1        ONLINE  ONLINE       rac3                     STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
--------------------------------------------------------------------------------
# RU升级检验
[grid@rac3:/u01/app/19.0.0/grid/OPatch]$./opatch lspatches
31780966;TOMCAT RELEASE UPDATE 19.0.0.0.0 (31780966)
31773437;ACFS RELEASE UPDATE 19.9.0.0.0 (31773437)
31772784;OCW RELEASE UPDATE 19.9.0.0.0 (31772784)
31771877;Database Release Update : 19.9.0.0.201020 (31771877)
OPatch succeeded.

3.2 db软件安装

3.2.1 节点RAC1上传rdbms软件包并解压到$ORACLE_HOME下,仅节点rac1即可

hewenyu@hewenyudeMacBook-Pro 19c-db % scp -r * oracle@192.168.56.201:/u01/app/oracle/product/19.0.0/db_1

3.2.2 节点rac1升级OPatch,新版本直接覆盖老版,仅节点rac1即可

# 上传软件直接覆盖$ORACLE_HOME下的OPatch目录
hewenyu@hewenyudeMacBook-Pro Downloads % scp p6880880_190000_Linux-x86-64.zip oracle@192.168.56.201:/home/oracle
[oracle@rac1:/home/oracle]$unzip -d /u01/app/oracle/product/19.0.0/db_1 p6880880_190000_Linux-x86-64.zip 
Archive:  p6880880_190000_Linux-x86-64.zip
replace /u01/app/oracle/product/19.0.0/db_1/OPatch/README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
……
# 检验OPatch版本
[oracle@rac1:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch version
OPatch Version: 12.2.0.1.28
OPatch succeeded.

3.2.3 oracle用户互信配置

# 解压rdbms软件包后,使用sshUserSetup.sh工具进行互信配置
# root用户节点1配置ssh互信,步骤如下:
# 此脚本适合多节点安装优先使用
/u01/app/oracle/product/19.0.0/db_1/oui/prov/resources/scripts/sshUserSetup.sh -user oracle -hosts "rac1 rac2 rac3" -advanced -noPromptPassphrase
# 检验互信,oracle用户
# 节点1, oracle用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date
# 节点2, oracle用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date
# 节点3, oracle用户运行检验操作
$ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh  rac1priv  date;ssh  rac2priv  date;ssh  rac3priv  date

3.2.4 图形化安装db软件并应用RU

oracle用户图形化安装
# 上传软件至/home/oracle,解压并修改权限
hewenyu@hewenyudeMacBook-Pro Downloads % scp p31771877_190000_Linux-x86-64.zip oracle@192.168.56.201:/home/oracle
[oracle@rac1:/home/oracle]$unzip p31771877_190000_Linux-x86-64.zip 
[oracle@rac1:/home/oracle]$chmod -R a+x 31771877/
[oracle@rac1:/home/oracle]$export CV_ASSUME_DISTID=RHEL7
[oracle@rac1:/u01/app/oracle/product/19.0.0/db_1]$./runInstaller -applyPSU /home/oracle/31771877/
# runInstaller -applyPSU是12.2.0.1的安装rdbms并应用RU的方法,我在19c也运行成功了,显然是向下兼容了12.2.0.1版本。更多请参考(Doc ID 1410202.1)
# 19c请参照:GI_HOME/gridSetup.sh -applyRU 
root用户节点2和3运行orainstRoot.sh
[root@rac2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
# 节点3省略,输出结果同节点2
root用户节点1和节点2和节点3运行root.sh
[root@rac1 opt]# /u01/app/oracle/product/19.0.0/db_1/root.sh
Performing root user operation.
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.0.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
# 节点2和3省略,输出结果同节点1
root运行root.sh脚本成功(所有节点)
3.2.5 rdbms安装成功,RU升级检查
[oracle@rac3:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch lspatches
31771877;Database Release Update : 19.9.0.0.201020 (31771877) <=ru已安装
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
OPatch succeeded.

3.3 asmca创建磁盘组

# grid用户图形化安装
asmca
[grid@rac3:/home/grid]$asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  1048576     10582    10435                0           10435              0             N  ARCH/
MOUNTED  EXTERN  N         512             512   4096  1048576     41044    40897                0           40897              0             N  DATA/
MOUNTED  NORMAL  N         512             512   4096  1048576      6144     5266             2048            1609              0             Y  OCR/

3.4 dbca创建database

# oracle用户图形化安装
3.4.1 dbca创建库前,需要解决INS-06006问题
# 为了解决INS-06006问题,可参考mos 2555697.1
# 安装前修改(root用户所有节点)
mv /usr/bin/scp /usr/bin/scp.orig
echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp
chmod 555 /usr/bin/scp
# 检查后,安装前需修复scp。因为安装过程中需要把节点1的软件copy到其他节点,需用scp
mv /usr/bin/scp.orig /usr/bin/scp
3.4.2 dbca创建库,并设置CV_ASSUME_DISTID=RHEL7
export CV_ASSUME_DISTID=RHEL7
dbca
3.4.3 dbca创建库完成后,查看crs资源状态
[grid@rac1:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.chad
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
               ONLINE  ONLINE       rac2                     STABLE
               ONLINE  ONLINE       rac3                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ARCH.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac3                     STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     Started,STABLE
      2        ONLINE  ONLINE       rac2                     Started,STABLE
      3        ONLINE  ONLINE       rac3                     Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       rac1                     STABLE
      2        ONLINE  ONLINE       rac2                     STABLE
      3        ONLINE  ONLINE       rac3                     STABLE
ora.cvu
      1        ONLINE  ONLINE       rac3                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       rac3                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                     STABLE
ora.rac3.vip
      1        ONLINE  ONLINE       rac3                     STABLE
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             /db_1,STABLE
      2        ONLINE  ONLINE       rac2                     Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             /db_1,STABLE
      3        ONLINE  ONLINE       rac3                     Open,HOME=/u01/app/o
                                                             racle/product/19.0.0
                                                             /db_1,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac3                     STABLE
--------------------------------------------------------------------------------
安装完成
3.4.4 不必执行,修改后的SQL文件加载到数据库中
#(因我们是先安装软件后创建database的所以省略这步。反之,若生产database先有数据后升级patch则必须将修改后的sql加载到数据库中)
# 将修改后的SQL文件加载到数据库中
# 安装补丁之后,还需要将有变化的SQL加载到数据库中,这里可以直接运行Datapatch工具将这些修改的SQL重新加载到数据库中,RAC环境,只需要在一个节点运行就可以了
datapatch -verbose执行与检查
[oracle@racdb2:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./datapatch -verbose
col action for a15
col status for a15
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
  PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- -------------------- --------------- --------------- ------------------------------
  31771877 RU APPLY WITH ERRORS 19.9.0.0.0
set lines 500 pages 500 
col description for a75
col action_time for a35
col action for a10
col comments for a50
col VERSION for a15
col NAMESPACE for a20
col BUNDLE_SERIES for a20
select action_time,action,NAMESPACE,VERSION,comments,BUNDLE_SERIES from registry$history;
ACTION_TIME     ACTION     NAMESPACE     VERSION     COMMENTS        BUNDLE_SERIES
----------------------------------- ---------- -------------------- --------------- -------------------------------------------------- --------------------
   BOOTSTRAP  DATAPATCH     19     RDBMS_19.9.0.0.0DBRU_LINUX.X64_200930
28-DEC-21 11.09.46.672145 PM     RU_APPLY   SERVER     19.0.0.0.0     Patch applied from 19.3.0.0.0 to 19.9.0.0.0: Relea
   se_Update - 20093018324
3.4.5 关闭开机自启动has
# 生产环境可启动开机自启 has,增加系统的强壮性。本文为测试环境,所以减少资料浪费,故关闭开机自启动has
/u01/app/19.0.0/grid/bin/crsctl disable has

4.附表

4.1 安装gi/db并应用patch

解决:Doc ID 1410202.1
使用方法参考
# Install/Upgrade the 18c GI and apply the patch to the Gold Image at the same time by running the following as the Grid user:
To apply only Release Updates:
$GI_HOME/gridSetup.sh -applyRU 
To apply only Non-RU patches:
$GI_HOME/gridSetup.sh -applyRUR 
To apply Release Updates and Non-RU patches in one command:
$GI_HOME/gridSetup.sh -applyRU  -applyOneOffs 
# Install/Upgrade the 12.2.0.1 Apply the patch to the Gold Image by running the following as the Grid user:
To apply only Release Updates:

$GI_HOME/gridSetup.sh -applyPSU 
To apply only Non-RU patches:
$GI_HOME/gridSetup.sh -applyOneOffs 
To apply Release Updates and Non-RU patches in one command:
$GI_HOME/gridSetup.sh -applyPSU  -applyOneOffs 

4.2 runcluvfy.sh报错PRVG-2002 and PRVF-5311解决办法参考mos 2555697.1

# 以上均为openssh升级OpenSSH_8.0p1后问题,scp发出的命令若是双引号中单有单引号则触发bug
# 解决办法:参考(Doc ID 2555697.1)
原因分析:
[root@rac3 tmp]# ssh -V
OpenSSH_8.0p1, OpenSSL 1.1.1g FIPS  21 Apr 2020
[root@rac3 tmp]# scp -p rac3:"'/tmp/text.txt'" /tmp/test.txt
root@rac3's password: 
protocol error: filename does not match request
# 双引号中,有单引号触发bug
[root@rac3 tmp]# scp -p rac3:"/tmp/text.txt" /tmp/test.txt
root@rac3's password: 
text.txt
# 双引号中,无单引号则正常
[root@rac3 tmp]# scp -T -p rac3:"'/tmp/text.txt'" /tmp/test.txt
root@rac3's password: 
text.txt 
# 也可以通过-T来避过bug
解决办法:
# 安装前修改(所有节点)
mv /usr/bin/scp /usr/bin/scp.orig
echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp
chmod 555 /usr/bin/scp
# 检查后,安装前需修复scp。因为安装过程中需要把节点1的软件copy到其他节点,需用scp
mv /usr/bin/scp.orig /usr/bin/scp

4.3 为了解决INS-06006问题,可参考mos 2555697.1

# 安装前修改(所有节点)
[root@rac1 ~]# mv /usr/bin/scp /usr/bin/scp.orig
[root@rac1 ~]# echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp
[root@rac1 ~]# chmod 555 /usr/bin/scp
# 检查后,安装前需修复scp。因为安装过程中需要把节点1的软件copy到其他节点,需用scp
[root@rac1 ~]# mv /usr/bin/scp.orig /usr/bin/scp

4.4 yum配置方法

centos的yum代替redhat的yum的配置方法:
卸载redhat的yum
rpm -qa|grep yum|xargs rpm -e --nodeps
下载centos的yum
wget
wget
wget
安装centos的yum                
[root@rac1 yum.repos.d]# rpm -ivh --force --nodeps yum-4.7.0-4.el8.noarch.rpm 
[root@rac1 yum.repos.d]# rpm -ivh --force --nodeps yum-utils-4.0.21-3.el8.noarch.rpm 
[root@rac1 yum.repos.d]# rpm -ivh --force --nodeps libcap-ng-python3-0.7.11-1.el8.x86_64.rpm 
配置yum
wget -O /etc/yum.repos.d/redhat.repo
清yum缓存,重建yum数据库
yum clean all
yum makecache
yum repolist

请使用浏览器的分享功能分享到微信等