ITPub博客

首页 > 数据库 > Oracle > oracle 19c rac静默安装

oracle 19c rac静默安装

原创 Oracle 作者:zjwmv 时间:2026-06-23 11:39:47 0 删除 编辑

前置

1 硬件规划

网卡 public / private ,是否bonding 


2 磁盘

RAC共享存储  ocr  data  fra ,及其冗余

软件安装目录规划 /soft   安装介质上传目录    /u01  软件安装目录


3 RAC IP、主机名、实例名规划

例:

主机名  racnode1  racnode2

##IP地址:

public:  192.168.11.221  192.168.11.222     

private: 192.168.201.221 192.168.201.222

vip:     192.168.11.223  192.168.11.224

scan:    192.168.11.225

实例名:racdb1 racdb2


安装准备:

#####################################################################

##第一部分  需调整处置

#####################################################################

1. 虚拟机调整

##1.1设置虚拟磁盘非独占模式 vmx文件添加如下,物理机忽略此步骤

scsi1.sharedBus = "virtual"

disk.locking = "false"

diskLib.dataCacheMaxSize = "0"

diskLib.dataCacheMaxReadAheadSize = "0"

diskLib.dataCacheMinReadAheadSize = "0"

diskLib.dataCachePageSize = "4096"

diskLib.maxUnsyncedWrites = "0"

disk.EnableUUID = "TRUE"


##1.2 添加设备

添加存储(步骤略)

   虚拟机添加独立永|久存储存储设备 、或存储服务器划分共享存储(物理磁盘多路径聚合) 

两组网卡public网络、private网络  (步骤略)

添加CD/DVD设备  (步骤略) 并挂载好本地ISO光盘 或者将本地镜像挂载并mount

    例: mount -t iso9660 -o loop /tmp/xxxx.iso /mnt


##重新启动如遭遇 磁盘启动顺序问题,进入"打开电源时进入固件"BIOS修改启动顺序

2. 网络配置

##网卡名称调整

nmcli c delete "有线连接 1"  ##删除中文形式的网卡名字,记住DEVICE名字

nmcli c 

##用DEVICE名字 新建 网卡

nmcli c a type Ethernet con-name ens33 ifname ens33

##ip地址调整


nmcli con mod ens33  ipv4.addresses '192.168.201.221/24'

nmcli con mod ens33  ipv4.method manual

nmcli con mod ens33  connection.autoconnect yes


nmcli con mod ens32  ipv4.addresses '192.168.11.221/24'

nmcli con mod ens32  ipv4.method manual

nmcli con mod ens32  connection.autoconnect yes

nmcli con mod ens32  ipv4.gateway "192.168.11.2" ipv4.dns "8.8.8.8" 

##变更加载生效

nmcli c reload

nmcli c up ens33

nmcli c up ens32


3 配置Yum仓库

##centos 7 mount the cdrom

mount /dev/cdrom /mnt

mkdir -p /etc/yum.repos.d/backup

mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/


##config the yum

cd /etc/yum.repos.d/

echo "

[base]

name=iso

baseurl=file:///mnt

enabled=1

gpgcheck=0

" >/etc/yum.repos.d/RHEL-ISO.repo

yum clean all

yum list|grep ftp

######################################################

##redhat8光盘配置

echo "[BaseOS]

name=BaseOS

baseurl=file:///mnt/BaseOS

enabled=1

gpgcheck=0


[AppStream]

name=AppStream

baseurl=file:///mnt/AppStream

enabled=1

pgcheck=0

" >/etc/yum.repos.d/RHEL-ISO.repo


yum clean all 

yum list


4 安装依赖

#19c centos7 8 

yum -y install xdpyinfo libnsl autoconf automake binutils binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel

yum -y install compat-db* compat-gcc-34 compat-gcc-34-c++ compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 glibc-* glibc-.i686 libXpm-.i686

yum -y install libXp.so.6 libXt.so.6 libXtst.so.6 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686

yum -y install libxcb libxcb.i686 libXi libXi.i686 libXtst libstdc++-docs libgcc_s.so.1

yum -y install libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686

yum -y install ksh libXp libaio-devel numactl numactl-devel make -y sysstat -y unixODBC unixODBC-devel elfutils-libelf-devel redhat-lsb-core

yum -y install 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


##suse12sp5

zypper in binutils gcc gcc-32bit gcc-c++ gcc-c++-32bit glibc glibc-devel ksh libaio libaio-devel libcap1 libstdc++48-devel libstdc++48-devel-32bit  libstdc++-devel libstdc++-devel-32bit

zypper se libstdc++ libgcc

zypper in  unixODBC unixODBC-devel libstdc++48 libstdc++48-devel  libgcc43 make sysstat xorg-x11-libs-32bit xorg-x11-libs xorg-x11-libX11-32bit xorg-x11-libX11 

zypper in xorg-x11-libXau-32bit xorg-x11-libXau xorg-x11-libxcb-32bit xorg-x11-libxcb xorg-x11-libXext-32bit xorg-x11-libXext unixODBC unixODBC-devel 

zypper in libcap-ng-utils libcap-ng0-32bit libcap-progs libcap1-32bit libXtst6-32bit


#如使用asmlib处理ASM共享磁盘

cd /etc/yum.repos.d

wget https://public-yum.oracle.com/public-yum-ol7.repo

##安装:

yum install -y kmod-oracleasm oracleasm-support  oracleasmlib


5  修改主机名 配置hosts文件

hostnamectl set-hostname racnode1   ##221

hostnamectl set-hostname racnode2   ##222

#修改/etc/hosts

echo "

#Public IP(公司内部访问,非外网)

192.168.11.221 racnode1

192.168.11.222 racnode2


#Private IP(用于节点间心跳网络)

192.168.201.221 racnode1-priv

192.168.201.222 racnode2-priv


#Virtual IP(提供客户端访问,漂移)

192.168.11.223 racnode1-vip

192.168.11.224 racnode2-vip


#SCAN IP(提供客户端访问,均衡)

192.168.11.225 racnode-scan

##可多个

" >> /etc/hosts


6. 时间同步

有本地时间服务器

/usr/sbin/ntpdate -u 192.168.11.1 && hwclock -w

或

chronyd -q 'server ntp.ntsc.ac.cn iburst' #时间服务器可以自行选择,这里选择国家授时中心时间

chronyd -q 'server ntp1.aliyun.com iburst' #阿里云

无本地时间服务器 自建(略)


7 多路径

##############配置激活多路径:

##RAC1 RAC2均执行:

##配置multipath.conf

## scsi磁盘 wwid获取  例: /usr/lib/udev/scsi_id -g -u /dev/sdb 

## nvme磁盘 wwid获取 例:  cat /sys/class/block/nvme0n2/wwid

## /dev/asm_ocr ocr盘 11g的时候 1G够用,19c需要至少1.2G


mpathconf --enable --with_multipathd y

mv /etc/multipath.conf /etc/multipath.conf.bak

cat <<EOF>/etc/multipath.conf

defaults {

    user_friendly_names yes

}

blacklist {

  devnode "^sda"

  devnode "^sdd"

}

multipaths {

  multipath {

  wwid "36000c293de477381c7227e347be44e84"

  alias asm_ocr

  }

 multipath {

  wwid "36000c29ac7e639a8ffc9c36015822b3e"

  alias asm_data

  }

}

EOF


#刷新 查看

multipath -F

multipath -v2

multipath -ll



##############配置UDEV绑定:

[ -f /dev/mapper/udev_info ] && rm -rf /dev/mapper/udev_info

[ -f /etc/udev/rules.d/99-oracle-asmdevices.rules ] && rm -rf /etc/udev/rules.d/99-oracle-asmdevices.rules

##生成 udev_info   99-oracle-asmdevices.rules

cd /dev/mapper

for i in asm_*; do

    printf "%s %s\n" "$i" "$(udevadm info --query=all --name=/dev/mapper/"$i" | grep -i dm_uuid)" >>/dev/mapper/udev_info

done


while read -r line; do

    dm_uuid=$(echo "$line" | awk -F'=' '{print $2}')

    disk_name=$(echo "$line" | awk '{print $1}')

    echo "KERNEL==\"dm-*\",ENV{DM_UUID}==\"${dm_uuid}\",SYMLINK+=\"${disk_name}\",OWNER=\"grid\",GROUP=\"asmadmin\",MODE=\"0660\"" >>/etc/udev/rules.d/99-oracle-asmdevices.rules

done </dev/mapper/udev_info


##查看文件内容

cat /dev/mapper/udev_info

cat /etc/udev/rules.d/99-oracle-asmdevices.rules

##重载udev

udevadm control --reload-rules

sleep 2

udevadm trigger --type=devices

##查看udev绑定

sleep 1

ll /dev/asm*

#####################################################################

##第二部分 直接执行

#####################################################################

##8 防火墙配置(rac01&rac02)

##############关闭防火墙

systemctl stop firewalld.service

systemctl disable firewalld.service

systemctl status firewalld.service


##9.selinux 配置(rac01&rac02)

##############selinux 配置(rac01&rac02)

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

setenforce 0

getenforce

cat /etc/selinux/config


##10.关闭透明大页和NUMA(rac01&rac02)

##关闭透明大页和numa:

cp /etc/default/grub /etc/default/grub.bak

sed -i 's/quiet/quiet transparent_hugepage=never numa=off/' /etc/default/grub

grub2-mkconfig -o /boot/grub2/grub.cfg


##11.avahi-daemon 配置禁用(rac01&rac02)

##有些主机安装选择最小化安装,没有安装 avahi-daemon 功能,建议安装之后禁用,防止以后误操作导致出问题:

#yum install -y avahi*

systemctl stop avahi-daemon.socket

systemctl stop avahi-daemon.service

pgrep -f avahi-daemon | awk '{print "kill -9 "$2}'

systemctl disable avahi-daemon.socket

systemctl disable avahi-daemon.service


##配置 NOZEROCONF:

mv /etc/sysconfig/network /etc/sysconfig/network.bak

cat <<EOF>>/etc/sysconfig/network

NOZEROCONF=yes

EOF


##12.系统参数配置

cp /etc/sysctl.conf /etc/sysctl.conf.bak


##一键配置 获取OS资源信息

memTotal=$(grep MemTotal /proc/meminfo | awk '{print $2}')

totalMemory=$((memTotal / 2048))

shmall=$((memTotal / 4))

if [ $shmall -lt 2097157 ]; then

        shmall=2097157

fi

shmmax=$((memTotal * 1024 - 1))

if [ "$shmmax" -lt 4294967295 ]; then

        shmmax=4294967295

fi

###配置系统参数

cat <<EOF>>/etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = $shmall

kernel.shmmax = $shmmax

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

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

##rp_filter 反向路径过滤 必须设置,否则两个节点的db实例无法交流,其中一个节点被踢出集群

net.ipv4.conf.ens32.rp_filter = 1  ##网卡根据 nmcli c 真实网卡调整

net.ipv4.conf.ens33.rp_filter = 2  ##~~

EOF


##参数 生效

cat /etc/sysctl.conf

sysctl -p


##13.系统资源限制配置(rac01&rac02)

###配置limits.conf:

cp /etc/security/limits.conf /etc/security/limits.conf.bak

cat <<EOF>>/etc/security/limits.conf

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768

oracle soft nproc 2047

oracle hard nproc 16384

oracle hard memlock 134217728

oracle soft memlock 134217728

grid soft nofile 1024

grid hard nofile 65536

grid soft stack 10240

grid hard stack 32768

grid soft nproc 2047

grid hard nproc 16384

EOF

###配置pam.d/login:

cp /etc/pam.d/login /etc/pam.d/login.bak

cat <<EOF>>/etc/pam.d/login

session required pam_limits.so

session required /lib64/security/pam_limits.so

EOF


##14、用户及组、目录创建(rac01&rac02)

###创建安装 Oracle 数据库所需的用户、组以及安装目录:(id如有重复 去掉 -g id )

/usr/sbin/groupadd -g 54321 oinstall

/usr/sbin/groupadd -g 54322 dba

/usr/sbin/groupadd -g 54323 oper

/usr/sbin/groupadd -g 54324 backupdba

/usr/sbin/groupadd -g 54325 dgdba

/usr/sbin/groupadd -g 54326 kmdba

/usr/sbin/groupadd -g 54327 asmdba

/usr/sbin/groupadd -g 54328 asmoper

/usr/sbin/groupadd -g 54329 asmadmin

/usr/sbin/groupadd -g 54330 racdba


###grid/oracle 用户创建:

/usr/sbin/useradd -u 54321 -g oinstall -G asmdba,dba,backupdba,dgdba,kmdba,racdba,oper -c "db user " oracle

/usr/sbin/useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba,racdba,oper -c "grid user " grid

##修改用户密码为123

echo "123" |passwd oracle --stdin

echo "123" |passwd grid --stdin


##查看用户组

id grid

id oracle

##重载udev

/sbin/udevadm trigger --type=devices --action=change

sleep 2

/sbin/udevadm control --reload-rules

sleep 1

ll /dev/asm*

ll /dev/dm*

###注意: /dev/dm*这里udev重载之后,绑盘权限已经显示为grid , asm仍为root 


###创建软件目录:

#19c

mkdir -p /u01/app/19.3.0/grid

mkdir -p /u01/app/grid

mkdir -p /u01/app/oracle/product/19.3.0/db

mkdir -p /u01/app/oraInventory

mkdir -p /backup

mkdir -p /home/oracle/scripts

chown -R oracle:oinstall /backup

chown -R oracle:oinstall /home/oracle/scripts

chown -R grid:oinstall /u01

chown -R grid:oinstall /u01/app/grid

chown -R grid:oinstall /u01/app/19.3.0/grid

chown -R grid:oinstall /u01/app/oraInventory

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01


##15、环境变量配置

####################################################################################

##11g环境变量配置

####################################################################################

#####################grid用户环境变量:

#RAC1:  

cat <<EOF>>/home/grid/.bash_profile

################OracleBegin#########################

umask 022

export TMP=/tmp

export TMPDIR=\$TMP

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/19.3.0/grid

export ORACLE_TERM=xterm

export TNS_ADMIN=\$ORACLE_HOME/network/admin

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib

export ORACLE_SID=+ASM1

export PATH=/usr/sbin:\$PATH

export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH

alias sas='sqlplus / as sysasm'

export PS1="[\`whoami\`@\`hostname\`:"'\$PWD]\$ '

EOF

chown grid.oinstall /home/grid/.bash_profile

######RAC2: 参考上述RAC1 ORACLE_SID 不一样 调整为: +ASM2

sed -i 's/+ASM1/+ASM2/g'  /home/grid/.bash_profile


#####################oracle用户环境变量:

#RAC1:

cat <<EOF>>/home/oracle/.bash_profile

################OracleBegin#########################

umask 022

export TMP=/tmp

export TMPDIR=\$TMP

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=\$ORACLE_BASE/product/19.3.0/db

export ORACLE_TERM=xterm

export TNS_ADMIN=\$ORACLE_HOME/network/admin

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib

export ORACLE_SID=racdb1

export ORACLE_HOSTNAME=racnode1

export PATH=/usr/sbin:\$PATH

export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH

alias sas='sqlplus / as sysdba'

export PS1="[\`whoami\`@\`hostname\`:"'\$PWD]\$ '

################OracleEnd#########################

EOF

chown oracle.oinstall /home/oracle/.bash_profile

######RAC2: 参考上述RAC1 ORACLE_SID 、HOSTNAME不一样

sed -i -e 's/racdb1/racdb2/g' -e 's/racnode1/racnode2/g' /home/oracle/.bash_profile


###################################################################################################

##进入 数据库安装

##16、重启虚拟机

reboot

##重启后检查禁用大页和numa是否生效:

cat /sys/kernel/mm/transparent_hugepage/enabled

cat /proc/cmdline

##参考步骤12 检查内核参数rp_filter,其中ens32 ens33调整为真实网卡

cat /etc/sysctl.conf|grep rp_filter

##修正后执行生效

sysctl -p


##17、安装介质上传解压(racnode1)

##上传安装介质到 ...(/soft)

chmod 777 /soft

##上传安装介质

LINUX.X64_193000_db_home.zip

LINUX.X64_193000_grid_home.zip


#补丁包:

p35940989_190000_Linux-x86-64.zip

p6880880_190000_Linux-x86-64.zip


解压缩:

##解压grid安装包:

su - grid -c "unzip -q /soft/LINUX.X64_193000_grid_home.zip -d /u01/app/19.3.0/grid/"


##解压oracle安装包:

su - oracle -c "unzip -q /soft/LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/db/"


##提前解压OPatch和RU补丁,为安装做准备

##解压OPatch补丁包

su - grid -c "unzip -q -o /soft/p6880880_190000_Linux-x86-64.zip -d /u01/app/19.3.0/grid"

su - oracle -c "unzip -q -o /soft/p6880880_190000_Linux-x86-64.zip -d /u01/app/oracle/product/19.3.0/db"

##解压RU补丁包

su - grid -c "unzip -q /soft/p35940989_190000_Linux-x86-64.zip -d /soft"

##chown -R grid:oinstall /soft/35940989



##cvuqdisk安装(racnode1&racnode2):

##racnode1:

su - root

cd /u01/app/19.3.0/grid/cv/rpm

rpm -ivh /u01/app/19.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm

##传输到节点二安装

scp /u01/app/19.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm  root@racnode2:~

##racnode2:

rpm -ivh ~/cvuqdisk-*.rpm


配置互信

#使用oracle侧自带的互信脚本,执行即可

su - oracle

cd $ORACLE_HOME

export SSH_AUTH_SOCK=0

./oui/prov/resources/scripts/sshUserSetup.sh -user grid  -hosts "racnode1 racnode2" -advanced -confirm -noPromptPassphrase

./oui/prov/resources/scripts/sshUserSetup.sh -user oracle  -hosts "racnode1 racnode2" -advanced -confirm -noPromptPassphrase

./oui/prov/resources/scripts/sshUserSetup.sh -user root  -hosts "racnode1 racnode2" -advanced -confirm -noPromptPassphrase


执行完毕,另开一窗口执行互信

su - oracle

date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date

su - grid

date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date


##grid集群对等验证检查

su - grid

$ORACLE_HOME/runcluvfy.sh comp admprv -n racnode1,racnode2 -o user_equiv -sshonly -verbose


suse12sp5 / redhat8.9 遭遇互信错误问题解决(centos 7无这个问题 忽略)

INS-06006 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

mv /usr/bin/scp /usr/bin/scp.his

vi /usr/bin/scp

# Add the below line to the new createdfile </usr/bin/scp>.

/usr/bin/scp.orig -T $*


# Change the file permission.

chmod 555 /usr/bin/scp



Afterinstallation:(所有安装都完成后 在调整修改回去)

mv /usr/bin/scp.his /usr/bin/scp


##SSH高版本会有这个问题,但suse12sp5版本和centos7相当也有这个问题。修改后对等验证可以过了

racnode1:~ # openssl version

OpenSSL 1.0.2p-fips  14 Aug 2018

[grid@racnode1:/u01/app/19.3.0/grid]$ ssh -V

OpenSSH_7.2p2, OpenSSL 1.0.2p-fips  14 Aug 2018


##########################################################

##18、静默安装Grid软件 (图形化安装见文档最后参考页面 )


#18.1 准备rsp文件

cat <<EOF > ~grid/grid_19c.rsp

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0

INVENTORY_LOCATION=/u01/app/oraInventory

oracle.install.option=CRS_CONFIG

ORACLE_BASE=/u01/app/grid

oracle.install.asm.OSDBA=asmdba

oracle.install.asm.OSOPER=asmoper

oracle.install.asm.OSASM=asmadmin

# SCAN:LOCAL_SCAN + hosts 里固定一个IP

oracle.install.crs.config.scanType=LOCAL_SCAN

oracle.install.crs.config.SCANClientDataFile=

oracle.install.crs.config.gpnp.scanName=racnode-scan

oracle.install.crs.config.gpnp.scanPort=1521


# 两节点独立集群

oracle.install.crs.config.ClusterConfiguration=STANDALONE

oracle.install.crs.config.configureAsExtendedCluster=false

oracle.install.crs.config.memberClusterManifestFile=

oracle.install.crs.config.clusterName=racnode-cluster

oracle.install.crs.config.gpnp.configureGNS=false

oracle.install.crs.config.autoConfigureClusterNodeVIP=false

oracle.install.crs.config.clusterNodes=racnode1:racnode1-vip,racnode2:racnode2-vip

oracle.install.crs.config.networkInterfaceList=eth0:192.168.11.0:1,eth1:192.168.201.0:5

oracle.install.crs.configureGIMR=false

oracle.install.asm.configureGIMRDataDG=false

# 存储选 ASM

oracle.install.crs.config.storageOption=FLEX_ASM_STORAGE

oracle.install.crs.config.useIPMI=false

oracle.install.crs.config.ipmi.bmcUsername=

oracle.install.crs.config.ipmi.bmcPassword=

oracle.install.asm.SYSASMPassword=oracle

oracle.install.asm.diskGroup.name=OCR

oracle.install.asm.diskGroup.redundancy=EXTERNAL

oracle.install.asm.diskGroup.AUSize=4

oracle.install.asm.diskGroup.disks=/dev/asm_ocr

oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*

oracle.install.asm.monitorPassword=oracle


oracle.install.asm.configureAFD=false

oracle.install.crs.configureRHPS=false

oracle.install.crs.config.ignoreDownNodes=false

oracle.install.config.managementOption=NONE


# 建议先不让安装器自动跑 root.sh,后续按提示手工执行

oracle.install.crs.rootconfig.executeRootScript=false

oracle.install.crs.config.ignoreDownNodes=false

EOF


chown -R grid.oinstall ~grid/grid_19c.rsp


####################################################

#18.2 静默安装

--安装前校验

su - grid

cd $ORACLE_HOME

export CV_ASSUME_DISTID=RHEL7.6  ##告诉安装器按照rls7.6来安装,可以避免很多问题。

export SSH_AUTH_SOCK=0  ##禁用SSH代理 互信的时候就有用到

export  LANG=en_US

./runcluvfy.sh stage -pre crsinst -n racnode1,racnode2 -verbose -fixup


Verifying Physical Memory ...FAILED

Verifying Swap Size ...FAILED

Verifying Network Time Protocol (NTP) ...FAILED (PRVG-1017)

Verifying resolv.conf Integrity ...FAILED (PRVG-2002)

Verifying DNS/NIS name service ...FAILED (PRVG-2002)


上述的问题 逐个确认,后续安装不影响 忽略


静默安装:

su - grid

cd $ORACLE_HOME

export CV_ASSUME_DISTID=RHEL7.6

export SSH_AUTH_SOCK=0

export  LANG=en_US

./gridSetup.sh -silent -ignorePrereqFailure -waitForCompletion  -responseFile ~/grid_19c.rsp

[grid@racnode1:/u01/app/19.3.0/grid]$ ./gridSetup.sh -silent -ignorePrereqFailure -waitForCompletion  -responseFile ~/grid_19c.rsp

Launching Oracle Grid Infrastructure Setup Wizard...


[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.

   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

   ACTION: Provide a password that conforms to the Oracle recommended standards.

[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.

   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

   ACTION: Provide a password that conforms to the Oracle recommended standards.

[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.

   ACTION: It is recommended to provide an empty location for the inventory.

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.

   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /tmp/GridSetupActions2026-06-19_05-41-41PM/gridSetupActions2026-06-19_05-41-41PM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /tmp/GridSetupActions2026-06-19_05-41-41PM/gridSetupActions2026-06-19_05-41-41PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

The response file for this session can be found at:

 /u01/app/19.3.0/grid/install/response/grid_2026-06-19_05-41-41PM.rsp


You can find the log of this install session at:

 /tmp/GridSetupActions2026-06-19_05-41-41PM/gridSetupActions2026-06-19_05-41-41PM.log

 

As a root user, execute the following script(s):

        1. /u01/app/oraInventory/orainstRoot.sh

        2. /u01/app/19.3.0/grid/root.sh


Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:

[racnode1, racnode2]

Execute /u01/app/19.3.0/grid/root.sh on the following nodes:

[racnode1, racnode2]


Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.


Successfully Setup Software with warning(s).

As install user, execute the following command to complete the configuration.

        /u01/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid_19c.rsp [-silent]



Moved the install session logs to:

 /u01/app/oraInventory/logs/GridSetupActions2026-06-19_05-41-41PM

[grid@racnode1:/u01/app/19.3.0/grid]$ 



#18.3 root脚本执行

####################################################

##以root用户在racnode1, racnode2执行脚本

/u01/app/oraInventory/orainstRoot.sh

/u01/app/19.3.0/grid/root.sh

##在racnode1的grid用户执行

racnode1:~ # /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.

racnode1:~ # /u01/app/19.3.0/grid/root.sh

Check /u01/app/19.3.0/grid/install/root_racnode1_2026-06-19_17-48-30-803157881.log for the output of root script

racnode1:~ # cat /u01/app/19.3.0/grid/install/root_racnode1_2026-06-19_17-48-30-803157881.log

Performing root user operation.


The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.3.0/grid

   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.3.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/racnode1/crsconfig/rootcrs_racnode1_2026-06-19_01-48-35AM.log

2026/06/19 01:48:40 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.

2026/06/19 01:48:40 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.

2026/06/19 01:48:40 CLSRSC-363: User ignored prerequisites during installation

2026/06/19 01:48:40 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.

2026/06/19 01:48:42 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.

2026/06/19 01:48:42 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.

2026/06/19 01:48:43 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.

2026/06/19 01:48:43 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.

2026/06/19 01:48:52 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.

2026/06/19 01:48:54 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.

2026/06/19 01:49:00 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.

2026/06/19 01:49:01 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.

2026/06/19 01:49:01 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

2026/06/19 01:49:04 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.

2026/06/19 01:49:04 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

2026/06/19 01:49:29 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.

2026/06/19 01:49:32 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.

2026/06/19 01:49:35 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.

2026/06/19 01:49:38 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.


ASM has been created and started successfully.


[DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-260619PM055007.log for details.


2026/06/19 01:51:07 CLSRSC-482: Running command: '/u01/app/19.3.0/grid/bin/ocrconfig -upgrade grid oinstall'

CRS-4256: Updating the profile

Successful addition of voting disk 47483550ad434f47bf132246419d045b.

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   47483550ad434f47bf132246419d045b (/dev/asm_ocr) [OCR]

Located 1 voting disk(s).

2026/06/19 01:52:10 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.

2026/06/19 01:53:04 CLSRSC-343: Successfully started Oracle Clusterware stack

2026/06/19 01:53:04 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.

2026/06/19 01:53:55 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

2026/06/19 01:54:12 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded


racnode2:

racnode2:~ # /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.

racnode2:~ # /u01/app/19.3.0/grid/root.sh

Check /u01/app/19.3.0/grid/install/root_racnode2_2026-06-19_17-56-37-759275746.log for the output of root script

racnode2:~ # cat /u01/app/19.3.0/grid/install/root_racnode2_2026-06-19_17-56-37-759275746.log

Performing root user operation.


The following environment variables are set as:

    ORACLE_OWNER= grid

    ORACLE_HOME=  /u01/app/19.3.0/grid

   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.3.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

  /u01/app/grid/crsdata/racnode2/crsconfig/rootcrs_racnode2_2026-06-19_01-56-43AM.log

2026/06/19 01:56:46 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.

2026/06/19 01:56:46 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.

2026/06/19 01:56:46 CLSRSC-363: User ignored prerequisites during installation

2026/06/19 01:56:46 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.

2026/06/19 01:56:52 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.

2026/06/19 01:56:52 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.

2026/06/19 01:56:52 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.

2026/06/19 01:56:52 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.

2026/06/19 01:56:53 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.

2026/06/19 01:56:53 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.

2026/06/19 01:57:00 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.

2026/06/19 01:57:00 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.

2026/06/19 01:57:00 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.

2026/06/19 01:57:00 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

2026/06/19 01:57:11 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.

2026/06/19 01:57:17 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.

2026/06/19 01:57:19 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.

2026/06/19 01:57:22 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.

2026/06/19 01:57:23 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.

2026/06/19 01:57:30 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.

2026/06/19 01:58:53 CLSRSC-343: Successfully started Oracle Clusterware stack

2026/06/19 01:58:53 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.

2026/06/19 01:59:18 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

2026/06/19 01:59:27 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded


查看集群状态

[grid@racnode1:/u01/app/19.3.0/grid]$ crsctl stat res -t


#########################################################################################################


#18.4 剩余配置执行

####################################################

##按照提示, 以安装用户的身份执行以下脚本来完成配置

/u01/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid_19c.rsp -silent

[grid@racnode1:/u01/app/19.3.0/grid]$ /u01/app/19.3.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid_19c.rsp -silent

Launching Oracle Grid Infrastructure Setup Wizard...


You can find the logs of this session at:

/u01/app/oraInventory/logs/GridSetupActions2026-06-19_06-00-42PM


You can find the log of this install session at:

 /u01/app/oraInventory/logs/UpdateNodeList2026-06-19_06-00-42PM.log

Configuration failed.

[WARNING] [INS-43080] Some of the configuration assistants failed, were cancelled or skipped.

   ACTION: Refer to the logs or contact Oracle Support Services.


#此warning 忽略


集群检查,查看服务是否有异常状态:

[grid@racnode1:/u01/app/19.3.0/grid]$ crsctl stat res -t



#########################################################################################################

##19、静默安装oracle软件

#19.1 准备rsp文件

cat <<EOF >~oracle/db_install_19c.rsp 

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/19.3.0/db

oracle.install.db.InstallEdition=EE

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=oper

oracle.install.db.OSBACKUPDBA_GROUP=backupdba

oracle.install.db.OSDGDBA_GROUP=dgdba

oracle.install.db.OSKMDBA_GROUP=kmdba

oracle.install.db.OSRACDBA_GROUP=racdba

oracle.install.db.rootconfig.executeRootScript=false

oracle.install.db.rootconfig.configMethod=

oracle.install.db.rootconfig.sudoPath=

oracle.install.db.rootconfig.sudoUserName=

oracle.install.db.CLUSTER_NODES=racnode1,racnode2

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

oracle.install.db.config.starterdb.globalDBName=

oracle.install.db.config.starterdb.SID=

oracle.install.db.ConfigureAsContainerDB=false

oracle.install.db.config.PDBName=

oracle.install.db.config.starterdb.characterSet=

oracle.install.db.config.starterdb.memoryOption=false

oracle.install.db.config.starterdb.memoryLimit=

oracle.install.db.config.starterdb.installExampleSchemas=false

oracle.install.db.config.starterdb.password.ALL=

oracle.install.db.config.starterdb.password.SYS=

oracle.install.db.config.starterdb.password.SYSTEM=

oracle.install.db.config.starterdb.password.DBSNMP=

oracle.install.db.config.starterdb.password.PDBADMIN=

oracle.install.db.config.starterdb.managementOption=DEFAULT

oracle.install.db.config.starterdb.omsHost=

oracle.install.db.config.starterdb.omsPort=0

oracle.install.db.config.starterdb.emAdminUser=

oracle.install.db.config.starterdb.emAdminPassword=

oracle.install.db.config.starterdb.enableRecovery=false

oracle.install.db.config.starterdb.storageType=

oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

oracle.install.db.config.asm.diskGroup=

oracle.install.db.config.asm.ASMSNMPPassword=

EOF


chown -R oracle.oinstall ~oracle/db_install_19c.rsp 


#19.2 执行安装

###################################################

cd $ORACLE_HOME

export CV_ASSUME_DISTID=RHEL7.6

export SSH_AUTH_SOCK=0

export  LANG=en_US

./runInstaller -silent -ignorePrereqFailure -waitForCompletion -responseFile ~/db_install_19c.rsp

[oracle@racnode1:/u01/app/oracle/product/19.3.0/db]$ ./runInstaller -silent -ignorePrereqFailure -waitForCompletion -responseFile ~/db_install_19c.rsp

Launching Oracle Database Setup Wizard...



[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.

   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2026-06-19_06-07-50PM/installActions2026-06-19_06-07-50PM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2026-06-19_06-07-50PM/installActions2026-06-19_06-07-50PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

The response file for this session can be found at:

 /u01/app/oracle/product/19.3.0/db/install/response/db_2026-06-19_06-07-50PM.rsp


You can find the log of this install session at:

 /u01/app/oraInventory/logs/InstallActions2026-06-19_06-07-50PM/installActions2026-06-19_06-07-50PM.log



As a root user, execute the following script(s):

        1. /u01/app/oracle/product/19.3.0/db/root.sh


Execute /u01/app/oracle/product/19.3.0/db/root.sh on the following nodes:

[racnode1, racnode2]



Successfully Setup Software with warning(s).

[oracle@racnode1:/u01/app/oracle/product/19.3.0/db]$


#19.3 执行root脚本

###################################################

###root执行脚本

##racnode1

racnode1:~ # /u01/app/oracle/product/19.3.0/db/root.sh

Check /u01/app/oracle/product/19.3.0/db/install/root_racnode1_2026-06-19_18-40-18-526450265.log for the output of root script

racnode1:~ # cat /u01/app/oracle/product/19.3.0/db/install/root_racnode1_2026-06-19_18-40-18-526450265.log

Performing root user operation.


The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/app/oracle/product/19.3.0/db

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...


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.


##racnode2 略


##20、静默创建数据库磁盘组

su - grid 

asmca -silent -createDiskGroup -diskGroupName DATA -diskList '/dev/asm_data' -redundancy EXTERNAL

asmcmd lsdg #查看


su - grid

sqlplus / as sysasm

set linesize  999

set pagesize 999

select inst_id,name,type,state,total_mb,free_mb from gv$asm_diskgroup;



##21、静默dbca建库

初始建库 建议放置到 step22 打补丁之后进行,这样postinstall部分可以不用执行。

#21.1 创建监听

netca -silent \

-responsefile $ORACLE_HOME/assistants/netca/netca.rsp


#21.2 准备rsp文件

cat <<EOF > ~oracle/dbca_19c.rsp

responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0

gdbName=racdb

sid=racdb

databaseConfigType=RAC

RACOneNodeServiceName=

createAsContainerDatabase=false

nodelist=racnode1,racnode2

templateName=General_Purpose.dbc

sysPassword=oracle

systemPassword=oracle.

oracleHomeUserPassword=

datafileDestination=+DATA/{DB_UNIQUE_NAME}/

recoveryAreaDestination=

storageType=

diskGroupName=+DATA/{DB_UNIQUE_NAME}/

characterSet=ZHS16GBK

nationalCharacterSet=AL16UTF16

EOF


#21.3 调整模板 

$ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc


#21.4 静默建库 

##dbca建库

export CV_ASSUME_DISTID=RHEL7.6

export SSH_AUTH_SOCK=0

export  LANG=en_US

[oracle@racnode1:/home/oracle]$ dbca -silent -createDatabase -responseFile ~/dbca_19c.rsp -ignorePreReqs

[oracle@racnode1:/home/oracle]$ dbca -silent -createDatabase -responseFile ~/dbca_19c.rsp -ignorePreReqs

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.

   CAUSE:

a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

b.The password entered is a keyword that Oracle does not recommend to be used as password

   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.

[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.

   CAUSE:

a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].

b.The password entered is a keyword that Oracle does not recommend to be used as password

   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.

Prepare for db operation

8% complete

Copying database files

33% complete

Creating and starting Oracle instance

34% complete

35% complete

39% complete

42% complete

45% complete

50% complete

Creating cluster database views

52% complete

67% complete

Completing Database Creation

71% complete

73% complete

75% complete

Executing Post Configuration Actions

100% complete

Database creation complete. For details check the logfiles at:

 /u01/app/oracle/cfgtoollogs/dbca/racdb.

Database Information:

Global Database Name:racdb

System Identifier(SID) Prefix:racdb

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/racdb/racdb.log" for further details.


[oracle@racnode1:/home/oracle]$ cat /u01/app/oracle/cfgtoollogs/dbca/racdb/racdb.log

[ 2026-06-19 18:45:50.219 GMT+08:00 ] [WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.

[ 2026-06-19 18:45:50.219 GMT+08:00 ] [WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.

[ 2026-06-19 18:45:52.641 GMT+08:00 ] Prepare for db operation

DBCA_PROGRESS : 8%

[ 2026-06-19 18:46:07.842 GMT+08:00 ] Copying database files

DBCA_PROGRESS : 33%

[ 2026-06-19 18:47:19.830 GMT+08:00 ] Creating and starting Oracle instance

DBCA_PROGRESS : 34%

DBCA_PROGRESS : 35%

DBCA_PROGRESS : 39%

DBCA_PROGRESS : 42%

DBCA_PROGRESS : 45%

DBCA_PROGRESS : 50%

[ 2026-06-19 18:50:28.934 GMT+08:00 ] Creating cluster database views

DBCA_PROGRESS : 52%

DBCA_PROGRESS : 67%

[ 2026-06-19 18:50:46.528 GMT+08:00 ] Completing Database Creation

DBCA_PROGRESS : 71%

DBCA_PROGRESS : 73%

DBCA_PROGRESS : 75%

[ 2026-06-19 18:52:47.537 GMT+08:00 ] Executing Post Configuration Actions

DBCA_PROGRESS : 100%

[ 2026-06-19 18:52:47.537 GMT+08:00 ] Database creation complete. For details check the logfiles at:

 /u01/app/oracle/cfgtoollogs/dbca/racdb.

Database Information:

Global Database Name:racdb

System Identifier(SID) Prefix:racdb


--删除数据库

#dbca -silent -deletedatabase -sourcedb racdb

#[oracle@racnode1:/home/oracle]$ dbca -silent -deletedatabase -sourcedb racdb

#Enter SYS user password:


#查看db状态

srvctl status database -d racdb 


#验证联通性 

192.168.11.225:1521/racdb   ok


##22、数据库打补丁

#22.1  xxxx补丁

上传补丁:

RU  :  p35940989_190000_Linux-x86-64.zip

OPatch:p6880880_190000_Linux-x86-64.zip



解压缩:

su - grid -c "unzip -q /soft/p35940989_190000_Linux-x86-64.zip -d /soft"


###################################################

#grid用户打补丁

##补丁预演:

su - grid

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35956421

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/36115038

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/33575402



##没报错,再打GI、DB补丁:

--root执行

source ~grid/.bash_profile

cd /soft

## 通过配置环境变量: CV_ASSUME_DISTID 来指示os的发行版本

export CV_ASSUME_DISTID=RHEL7.6  

export SSH_AUTH_SOCK=0

export LANG=en_US

#opatchauto apply /soft/35940989 

opatchauto apply /soft/35940989 -oh /u01/app/19.3.0/grid 


##检查集群状态:

su - grid

crsctl stat res -t


opatch lspatches

[grid@racnode2:/home/grid]$ opatch lspatches

36115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)

35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)

35956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)

35943157;Database Release Update : 19.22.0.0.240116 (35943157)

33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.


###################################################

oracle用户打补丁:

#GI补丁权限调整为oracle,GI中包含DB补丁

chown -R oracle.oinstall /soft/35940989

##补丁预演:

su - grid

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35956421

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/36115038

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/33575402


##注意节点2打补丁检查下述文件权限

#node1:

#[root@racnode1 ~]# ls -l /u01/app/oraInventory/ContentsXML/oui-patch.xml

#-rw-rw-r-- 1 grid oinstall 174 Jun  5 12:11 /u01/app/oraInventory/ContentsXML/oui-patch.xml

#node2:

#[root@racnode2 ~]# ls -l /u01/app/oraInventory/ContentsXML/oui-patch.xml

#-rw-r--r-- 1 grid oinstall 174 Jun  5 12:34 /u01/app/oraInventory/ContentsXML/oui-patch.xml

#如权限不一致,节点2按照下述修改权限(导致db打补丁失败)

ls -l /u01/app/oraInventory/ContentsXML/oui-patch.xml

chmod 664 /u01/app/oraInventory/ContentsXML/oui-patch.xml


#没报错,再打GI、DB补丁:

--root执行

source ~oracle/.bash_profile

export CV_ASSUME_DISTID=RHEL7.6  

export SSH_AUTH_SOCK=0

export LANG=en_US

#opatchauto apply /soft/35940989 

cd /soft

opatchauto apply /soft/35940989 -oh /u01/app/oracle/product/19.3.0/db

######日志如下:


##检查安装情况和版本

[oracle@racnode1:/home/oracle]$ opatch lspatches

35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)

35943157;Database Release Update : 19.22.0.0.240116 (35943157)


OPatch succeeded.


##########################################################################################

racnode2打补丁:(node3 ..... )

##1. 先挂盘 (这里补丁盘是共享的 故需要挂盘切换,)

echo "- - -" > /sys/class/scsi_host/host32/scan ##盘不识别 启用scsi重扫描识别

mount /dev/sda /soft

chmod 777 /soft


##参照racnode1打补丁


##如第二个节点打oracle补丁报错,处理如下

##回退补丁

opatch rollback -id 35943157

##在打补丁

chmod 660 /u01/app/oraInventory/ContentsXML/oui-patch.xml

opatch apply -oh $ORACLE_HOME -local /soft/35943157


###################################################

补丁完成DB更新

参照  Patch Post Installation Instructions   进行(略)


##23、安装完成后数据库初始优化建议(仅测试环境忽略本部分)

1).控制文件优化 ,控制文件数量至少2个,只有1个的进行增加

2).在线重做日志组优化,19c默认每个redo文件200M,日志组增加到每节点4-5组。文件大小,建议保证高峰负载期间,约10分钟切换一个redo。

3).配置 RMAN 备份任务(bct启用与否)

4). 优化数据库参数

a.安全与审计策略  b.内存管理自动与否,sga pga初始值设置  c.并发资源设置 d.Undo调优 e.稳定性修复(诸如关闭优化器新特性)

f.高可用与故障处理参数


参考文档:

oracle 19c RAC 图形化安装:  https://blog.itpub.net/15404498/viewspace-3173335/

oracle 11g rac 图形化安装:  https://blog.itpub.net/15404498/viewspace-3173420/

RPM下载站 RPM.PBONE.NET:    https://rpm.pbone.net/index.php3




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15404498/viewspace-3174220/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-03-05

  • 博文量
    36
  • 访问量
    26764