标题: 在GI安装之前,如何给GI打补丁 [打印本页] 作者: 郑全 时间: 2020-12-24 23:39 标题: 在GI安装之前,如何给GI打补丁 How to Apply a Grid Infrastructure Patch Before Grid Infrastructure Configuration (before root.sh or rootupgrade.sh or gridsetup.bat) is Executed (Doc ID 1410202.1) To BottomTo Bottom
In this Document
Purpose
Questions and Answers
18.1 and above
An example is:
12.2.0.1
Method 1: 12.1.0.x
Method 2: 12.1.0.2 or 11.2.0.x - Apply during installation for Linux and UNIX
11.2.0.x or 12.1.0.2
12.1.0.1 only:
References
APPLIES TO:
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
PURPOSE
It may be necessary to apply a patch prior to the execution of the root script to ensure successful root script execution (e.g. Document:1212703.1 ). This note describe the procedure to apply a Grid Infrastructure patch(including GI PSU patch) before GI is configured (in other word, before root.sh or rootupgrade.sh is executed).
In upgrade case, the note applies when a patch is being applied to the new GI home, it does not apply when applying to the existing (current) clusterware home.
Prior to executing the root script, applying a GI patch with the patch readme may result in failure as these instruction are written for a "configured" GI Home.
"opatch auto" must NOT be used as the new GI home hasn't been configured yet.
QUESTIONS AND ANSWERS
18.1 and above
1. Unzip Grid Infrastructure Gold Image to the Desired GI Home Location on the Local Node as the Grid user
2. Download and Install the latest OPatch Version (Patch 6880880) to the extracted GI Gold Image as the Grid user:
Note: Choose Overwrite ALL when prompted, do NOT remove the old OPatch directory from the GI_HOME prior to extracting
$ unzip -d $GI_HOME p6880880_<platform version info>.zip
3. 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 -silent -applyRU <downloaded patch location>
For Windows: $GI_HOME/gridSetup.bat -silent -applyRU <downloaded patch location>
Note: If -silent option use, also specify -responseFile option and specify response file to avoid "[FATAL] [INS-40426] Grid installation option has not been specified." error.
An example is:
$ ./gridSetup.sh -applyRU /u01/patch/27100009/
Preparing the home to patch...
Applying the patch /u01/patch/27100009/...
Successfully applied the patch.
4. Install with normal flow of gridSetup.sh. At the end of the installation OPatch should show the patch installed:
(If 'opatch lspatches' fail with below error, Check that gridSetup.sh has been run, then try again)
NOTE: In 18c you cannot apply the patch with opatchauto or 'gridSetup.sh -applyRU <downloaded patch location>' alone before running root.sh or rootupgrade.sh. The patch must be applied when initially launching the gridSetup.sh as noted above.
12.2.0.1
The steps for 12.2.0.1 are:
1. Unzip Grid Infrastructure Gold Image to the Desired GI Home Location on the Local Node as the Grid user
2. Download and Install the latest OPatch Version (Patch 6880880) to the extracted GI Gold Image as the Grid user:
Note: Choose Overwrite ALL when prompted, do NOT remove the old OPatch directory from the GI_HOME prior to extracting
$ unzip -d $GI_HOME p6880880_<platform version info>.zip
3. Apply the patch to the Gold Image by running the following as the Grid user:
4. Run <GRID_HOME>/crs/config/config.sh to configure/upgrade the stack. On Windows, use config.bat instead of config.sh
Method 2: 12.1.0.2 or 11.2.0.x - Apply during installation for Linux and UNIX
The high level flow is:
1. Install Grid Infrastructure with installer so the software is pushed to all other nodes in the cluster by the installer.
2. While prompted to run root script (root.sh or rootupgrade.sh), apply with below procedure.
3. After patch is applied, resume the normal flow which is to run root script etc.
11.2.0.x or 12.1.0.2
Since "opatch auto" relies on running Oracle Clusterware to identify the configuration, it can not be used to apply a GI patch to the new GI home before root.sh or rootupgrade.sh is executed.
It's recommended to apply latest GI PSU, refer to Document:756671.1 for the patch#.
The steps below describe how to apply 11.2.0.2.3 GI PSU (GI PSU 3) to a newly installed GI home prior to executing the root script but the procedure will be the same (with the exception of the release and patch numbers) for any 11.2 GI installation.
1. When prompted by the OUI to run root.sh (new install) or rootupgrade.sh (upgrade), DO NOT run the root.sh or rootupgrade.sh scripts but leave the installer GUI window open (and root scripts prompt)
2. Install the 11.2.0.2.3 GI PSU (12419353) to the newly installed (but unconfigured) 11.2.0.2 GI home as follows (DO NOT follow the readme, the instructions in the readme will cause the patch install to fail for an unconfigured GI home).
3. Install the latest version of OPatch 11.2 (available under Patch 6880880) into the GI home as described in Document:1339140.1 under "How do I install the latest OPatch release?"
4. Create an EMPTY directory to stage the GI PSU as the GI software owner (our example uses a directory named gipsu):
% mkdir /u01/stage/gipsu
5. Extract the GI PSU into the empty stage directory as the GI software owner:
## note: as GI PSU zipfile contains both GI PSU and DB PSU, it will create two sub-directory12419353 and12419331 which is for corresponding GI and DB PSU
6. Apply patch to the newly installed 11.2.0.2 GI home as the GI software owner using OPatch apply:
Go to each of the subdirectory in the unzipped location, and execute "opatch apply|napply" command.
For example:
% cd /u01/stage/gipsu/12419353
% <11.2.0.2GI_HOME>/OPatch/opatch apply /u01/stage/gipsu/12419353 -oh <11.2.0.2GI_HOME> -local
% cd /u01/stage/gipsu/12419331
% <11.2.0.2GI_HOME>/OPatch/opatch apply /u01/stage/gipsu/12419331 -oh <11.2.0.2GI_HOME> -local
7. Repeat the above steps 3-6 on ALL cluster nodes
8. Once the 11.2.0.2.3 GI PSU has been applied to the newly installed GI home (on ALL nodes), you can now execute the root.sh or rootupgrade.sh script one node at a time (allowing the current node to complete prior to moving on to the next) as instructed in the OUI popup window.
9. Once the root script has completed successfully on all nodes, complete the upgrade/installation by clicking okay in the root script popup OUI window that was left open in step 1.
12.1.0.1 only:
For 12.1.0.1, above procedure will not work due to internal bug, either of the following workaround can be used:
1: Do not apply any patches to 12.1.0.1 home before executing root script (root.sh or rootupgrade.sh), instead configure GI first. Once GI is up and running from 12.1.0.1 home, a patch can be applied.
OR
2. Install 12.1.0.1 with software only option on all nodes, apply a patch to 12.1.0.1 home with "opatch apply" command, and execute <GI_HOME>/crs/config/config.sh to configure/upgrade to 12.1.0.1, refer to Document:1354258.1 for details of config.sh