oracle 11g rac下打ojvm psu 的操作步骤
背景:
现在等保一检查,发现大量的ojvm的漏洞,以前一般只都打了 db,gi的psu,对 jvm这块关注不够
环境:
rhel 5.4
db:oracle 11g rac 11.2.0.4
目标:
安装 Oracle JavaVM Component 11.2.0.4.181016 Database PSU
1.前提条件
打ojvm有前提条件,就是 db都必须是一下版本之上
Database PSU 11.2.0.4.4 (Oct2014) (Patch number: 19121551)
Database SPU 11.2.0.4 (CPUOct2014)
Database patch for Exadata 11.2.0.4.12 (Oct2014)
可以先检查一下这些补丁
$ORACLE_HOME/OPatch/opatch lsinventory
2.停数据库,包含所有节点的数据库 ,不用停集群
srvctl stop database -d orcl
3.解压补丁包
cd /stage/psu
unzip unzip p28440700_112040_LINUX.zip
4.检查当前ojvm是否有冲突
$ cd 28440700
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
5.应用psu (需要在所有节点执行)
$ORACLE_HOME/OPatch/opatch apply
opatch apply后,此$ORACLE_HOME/bin/oracle 文件属组由oracle:asmadmin变为oracle:oinstall,解决方法为:
$ORACLE_HOME/bin/setasmgidwrap o=/u02/app/oracle/product/11.2.0/db_home/bin/oracle
6.检查确认
$ORACLE_HOME/OPatch/opatch lsinventory
[oracle@host02 psu]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.20
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2019-04-16_13-07-56PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2019-04-16_13-07-56PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: host02.example.com
ARU platform id: 46
ARU platform description:: Linux x86
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (3) :
Patch 28440700 : applied on Tue Apr 16 12:34:36 CST 2019
Unique Patch ID: 22502957
Patch description: "OJVM PATCH SET UPDATE 11.2.0.4.181016"
Created on 15 Oct 2018, 08:23:27 hrs PST8PDT
Bugs fixed:
18933818, 19176885, 17201047, 25649873, 25067795, 28502128, 27952577
14774730, 27461842, 19153980, 21911849, 23727132, 18166577, 27000663
24448240, 17056813, 21811517, 19909862, 25494379, 22675136, 24534298
19895326, 22253904, 17804361, 19231857, 27642235, 26023002, 17528315
19058059, 19554117, 19007266, 17285560, 22670385, 18458318, 19187988
23265914, 19699946, 19006757, 19374518, 19223010, 25076732, 22118835
26637592, 19852360, 20408829, 21047766, 21566944
Patch 28729262 : applied on Tue Apr 16 11:37:29 CST 2019
Unique Patch ID: 22664318
Patch description: "Database Patch Set Update : 11.2.0.4.190115 (28729262)"
...
6.更新sql文件 (只在一个节点执行即可)
cd $ORACLE_HOME/sqlpatch/28440700
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> alter system set cluster_database=false scope=spfile;
SQL> SHUTDOWN
SQL> STARTUP UPGRADE
SQL> @postinstall.sql
SQL> alter system set cluster_database=true scope=spfile;
SQL> SHUTDOWN
SQL> STARTUP
编译无效对象
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
验证一下sql更新
SQL> col comment for a30
r
1* select VERSION,COMMENTS,BUNDLE_SERIES ,ACTION_TIME from registry$history
VERSION COMMENTS BUNDLE_SERIES ACTION_TIME
------------------------------ ------------------------------ ------------------------------ ---------------------------------------------------------------------------
...
11.2.0.4.181016OJVMPSU RAN jvmpsu.sql 16-APR-19 12.47.23.093855 PM
11.2.0.4.181016OJVMPSU OJVM PSU post-install 16-APR-19 12.47.26.462602 PM
Patch 28440700 applied 16-APR-19 12.47.26.650309 PM
...
到此ojvm psu更新完毕
|