技术知识
oracle 19c 的安装及应用2022年第3季度最新补丁
Oracle安装
使用 ASM 并通过 ASMFD 持久化存储路径
安装及Apply RU 19.16(2022年第三季度最新的补丁,发布日期为JULY 27, 2022)
将必要的文件,如GI和DB、RU 和最新的 OPatch 放在 /tmp 下。
- 操作系统层的准备
- 关闭防火墙
- 使用预安装 RPM 配置操作要求
- 创建grid用户和必要的group
- 相关用户密码设置
- 创建安装目录
- 安装GI(Grid Infrastructure)
- 必要的文件准备
- 解压 Grid Infrastructure 的 zip 文件
- 将 OPatch 替换为最新的以应用 RU中的版本
- 解压 RU 19.16补丁zip文件
- 准备 ASM 磁盘
- 运行GI安装程序(grid用户)
- 运行安装并同时应用 RU
- 创建磁盘组
- 创建名称为 DATA的磁盘组
# systemctl stop firewalld
# systemctl disable firewalld
# yum install oracle-database-preinstall-19c.x86_64
# useradd -u 54322 -g oinstall -G dba grid
# groupadd -g 54327 asmdba
# groupadd -g 54328 asmoper
# groupadd -g 54329 asmadmin
# usermod -g oinstall -G asmdba,asmoper,asmadmin,racdba grid
# usermod -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,racdba oracle
# passwd grid
# passwd oracle
# mkdir -p /u01/app/grid
# mkdir -p /u01/app/oracle
# chown -R grid:oinstall /u01
# chown oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/
$ mkdir -p /u01/app/grid/product/19.0.0/grid
$ cd /u01/app/grid/product/19.0.0/grid
$ unzip -q /tmp/V982068-01.zip
$ mv /u01/app/grid/product/19.0.0/grid/OPatch /u01/app/grid/product/19.0.0/grid/OPatch_org
$ unzip /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/grid/product/19.0.0/grid
$ unzip p34130714_190000_Linux-x86-64.zip
使用 ASMFD 的标签。标签名称是“DATA”,并且 /dev/sdb 按原样使用(不创建分区)。这次我们设置为外部冗余,示例中只有一个磁盘。
# export ORACLE_HOME=/u01/app/grid/product/19.0.0/grid/
# export ORACLE_BASE=/tmp
# $ORACLE_HOME/bin/asmcmd afd_label DATA /dev/sdb --init
# $ORACLE_HOME/bin/asmcmd afd_lslbl /dev/sdb
$ /u01/app/grid/product/19.0.0/grid/gridSetup.sh -applyRU /tmp/34130714
成功应用 RU 后,OUI 会启动安装程序。
选择为独立服务器配置 Oracle Grid Infrastructure (Oracle Restart)
Click Standalone server
- Click External – > browse /dev/oracleasm/disks -> select the disk
- Enter ASM Password
- Leave as it is
- Change according to your user groups
- check the base and home going to install
- Check the inventory directory
- Leave as it is
- Click ignore all
- Click install
- Needs to execute the below script as a root user
- 依据上图中的提示路径,使用root用户执行脚本
- Oracle 19c Grid installation successfully completed
- 检查grid 相关进程状态
- 使用 ASMCA 工具创建 ASM 磁盘组(如需要)
- Export Path and start asmca tool
- Enter password and click specify disk group
- Type /dev/oracleasm/disks and press ok
- Enter Data -> external -> select disk path
- Asm Diskgroup created successfully
# /u01/app/oraInventory/orainstRoot.sh
# /u01/app/oracle/19c/grid/root.sh
$ crsctl check has
CRS-4638: Oracle High Availability Services is online
$ crsctl check css
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
$ crsctl check evm
CRS-4533: Event Manager is online
$ export PATH=$ORACLE_HOME/bin:$PATH
$ asmca
用户grid的 .bash_profile 中设置环境变量
- 数据库安装
- 解压必要的文件(oracle用户)
- 将 OPatch 替换为最新的以应用 RU。
- 运行安装程序 (oracle)
- 安装完成后在oracle用户的.bash_profile中设置环境变量
- 创建数据库
- 附录
- 使用到的补丁文件列表
- GI RELEASE UPDATE 19.16.0.0.0 (Patch)
- DATABASE RELEASE UPDATE 19.16.0.0.0 (Patch)
- OJVM RELEASE UPDATE 19.16.0.0.0 (Patch)
- Database patch bundles list
添加如下内容
umask 022
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/19.0.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=+ASM
export LANG= "AMERICAN_AMERICA.UTF8"
export NLS_LANG= "AMERICAN_AMERICA.UTF8"
提取数据库 zip 文件。
$ mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
$ unzip -d /u01/app/oracle/product/19.0.0/dbhome_1 /tmp/V982063-01.zip
$ mv /u01/app/oracle/product/19.0.0/dbhome_1/OPatch /u01/app/oracle/product/19.0.0/dbhome_1/OPatch_org
$ unzip /tmp/p6880880_190000_Linux-x86-64.zip -d /u01/app/oracle/product/19.0.0/dbhome_1
$ /u01/app/oracle/product/19.0.0/dbhome_1/runInstaller -applyRU /tmp/34130714
成功应用 RU 后,OUI 会启动安装程序。数据库安装与普通单实例基本相同。
添加如下内容:
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=ja_JP.UTF-8
export NLS_LANG=Japanese_Japan.AL32UTF8
使用数据库配置助手 (DBCA) 创建数据库。
这也和普通的单实例基本相同,但是由于数据文件是放在ASM上的,所以需要在“数据库文件存储类型”中选择“自动存储管理(ASM)”。
(常规操作,细节省略)
Oracle Database 19c Release Update & Release Update Revision July 2022 Known Issues (Doc ID 19202207.9)
Last updated on JULY 27, 2022
GI的RU编号是: 34130714
DB的RU 编号是:34133642
p34130714_190000_Linux-x86-64.zip
2.6 GB
(2814622872 bytes)
SHA-256B5DB8FCECAB33E2AA53CAB4927E4B312FA6DAB38F622DF5CFE9A66D6EBD6BACA
p34133642_190000_Linux-x86-64.zip
1.5 GB
(1558173061 bytes)
SHA-256B66A841247BB91E28595423CF53A91746E3D03C8DE6F45DDB2E882BBC64CB2C3
p34086870_190000_Linux-x86-64.zip
120.0 MB
(125856002 bytes)
SHA-25659751231AFC8D6D7544F4073971A5B1ADCC38C9A3E0D568E2C7AACC7B195454B
Released on July 19, 2022 for Release 19c were:
Name | Download Link |
Database Release Update 19.16.0.0.220719 | <Patch 34133642> |
Grid Infrastructure Release Update 19.16.0.0.220719 | <Patch 34130714> |
OJVM Release Update 19.16.0.0.220719 | <Patch 34086870> |
Database Release Update Revision 19.15.1.0.220719 | <Patch 34119532> |
Database Release Update Revision 19.14.2.0.220719 | <Patch 34110559> |
Grid Infrastructure Release Update Revision 19.15.1.0.220719 | <Patch 34110582> |
Grid Infrastructure Release Update Revision 19.14.2.0.220719 | <Patch 34164837> |
(there were no OJVM Release Update Revisions for Jul 2022) | |
Microsoft Windows 32-Bit & x86-64 Bundle Patch 19.16.0.0.220719 | <Patch 34110685> |
This is the Known Issues note for the patches listed above. These known issues are in addition to the issues listed:
- in the README file for each individual Release Update (RU), Release Update Revision (RUR), or Bundle Patch (BP).
- in <Note 555.1>, "Oracle Database 19c Important Recommended One-off Patches"