jueves, 6 de julio de 2017

Installation of Oracle Grid/RAC 11.2.0.4 on RHEL 7 or Oracle Linux 7

Some days ago, I had to install Oracle 11.2.0.4 on Red Hat Linux 7 and Grid Infrastructure for a standalone server. What I expected to be a quick task turned to be trickier than expected. Here outlined are the steps for the installation.





Red Hat Linux 7 and Oracle Linux 7 have important changes that impact on the installation process of Grid Infrastructure and Oracle RDBMS 11.2.0.4.
Let's do a review of the new details on the installation process.

Those steps have been done in a single instance environment. Perhaps you'd need some modification for RAC. Check Support Note 1951613.1 for details.

Prerequirements:
First, download from Oracle Support the newest version of OPatch. (download patch number 6880880, it always contain the most up to date version of OPatch)
Download patches  19404309, 18370031 y 19692824.
OUI says complains if the package pdksh is not installed on the system, but this package is not needed (Bug 19947777).
So, you can safely ignore this prerequisite when the OUI complains about it (mark 'Ignore All', provided you fulfill all the other prerequirements), or if you are sure
that all the prerequirements are fullfilled, you can run the OUI as: ./runInstaller -ignorePrereq  (that will not run the prerequirements check).
Package compat-libstdc++-33 is needed to avoid problems when patching (BUG 22477834), but is no longer available in the RHEL 7 DVD. You can download it from Red Hat or from
the public Oracle repository http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm


1. Before starting the installation of Grid Infrastructure, apply patch 19404309:
   - Uncompress the installation zipped files (both RDBMS ad GRID) in a staging area (we'll use in  that case /SOFT):
    [TST][myoraserv].oracle > unzip p13390677_112040_Linux-x86-64_1of7.zip -d /SOFT
   [TST][myoraserv].oracle > unzip p13390677_112040_Linux-x86-64_2of7.zip -d /SOFT
   [TST][myoraserv].oracle > unzip p13390677_112040_Linux-x86-64_3of7.zip -d /SOFT


   - Uncompress patch  19404309
       unzip p19404309_112040_Linux-x86-64.zip -d /SOFT
         

   - Apply patch:
        For the database installation files:
    [TST][myoraserv].oracle:SOFT > cd b19404309
   [TST][myoraserv].oracle:b19404309 >
   [TST][myoraserv].oracle:b19404309 > cp database/cvu_prereq.xml /SOFT/database/stage/cvu
   [TST][myoraserv].oracle:b19404309 >


        For the grid infrastructure installation files:
        [TST][myoraserv].oragrid:b19404309 > cp grid/cvu_prereq.xml /SOFT/grid/stage/cvu
        [TST][myoraserv].oragrid:b19404309 >

    Also, if you have downloaded the installation files for the client or the examples, do the same. (check README from patch)

  -  Delete the patch installation directory:
    [TST][myoraserv].oracle:b19404309 > cd ..
    [TST][myoraserv].oracle:SOFT > rm -rf b19404309


2. We start to install GI as usual. The moment the OUI shows the screen asking to run root.sh and orainstroot.sh, BEFORE running them,
   we must install patch 18370031. Once finalized patch installation, we continue the setup process as usual.
   If we choose to install the software only, without performing the configuration, the patch must be installed once the setup ends, but before start the config process.
 
   So, we run the runInstaller.sh as usual and , when the screen asking us to run root.sh appears, from another terminal window, we install the patch.

   First, we update OPatch: (in our case, GRID_HOME is /opt/grid)
    [TST][myoraserv].oracle > cd /opt/grid
    [TST][myoraserv].grid >mv OPatch OPatch_OLD
    [TST][myoraserv].grid > cd /SOFT
    [TST][myoraserv].SOFT > unzip p6880880_112000_Linux-x86-64.zip -d /opt/grid

  We install patch 18370031
    [TST][myoraserv].SOFT > mkdir patch
    [TST][myoraserv].SOFT > unzip p18370031_112040_Linux-x86-64.zip -d patch
    [TST][myoraserv].SOFT > cd /opt/grid/OPatch
 
   [TST][myoraserv].OPatch > ./opatch napply -oh /opt/grid -local /SOFT/patch/18370031
  (CHECK IT IF ARE DOING A MULTINODE SETUP)

    Applying interim patch '18370031' to OH '/opt/grid'

    Patching component oracle.crs, 11.2.0.4.0...
    Patch 18370031 successfully applied.
    Log file location: /opt/grid/cfgtoollogs/opatch/opatch2017-01-31_14-24-24PM_1.log

    OPatch succeeded.

       [TST][myoraserv].oragrid:OPatch >


   Now, we run orainstroot.sh and root.sh and proceed as usual.

    LOCAL ADD MODE
    Creating OCR keys for user 'oragrid', privgrp 'oinstall'..
    Operation successful.
    LOCAL ONLY MODE
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    CRS-4664: Node myoraserv successfully pinned.
    Adding Clusterware entries to oracle-ohasd.service

    myoraserv     2017/01/31 14:27:11     /opt/grid/cdata/myoraserv/backup_20170131_142711.olr
    Successfully configured Oracle Grid Infrastructure for a Standalone Server
    [TST][myoraserv].root:grid >


3. Now, we install the RDBMS

  If we haven't  applied patch 19404309, we do it now following the previously listed steps.

  As oracle user, we start the installation process as usual, running the OUI.

  Approximately at 86% of the setup process, appears an error screen reading:

      Error in invoking target 'agent nmhs' of makefile '/opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk'.
      See '/opt/oracle/oraInventory/logs/installActions2017-01-31_03-08-38PM.log' for details.

  We have the option to continue with the setup. So, we continue and once the setup ends, we install patch 19692824.

  First, we verify the version of perl. Must be 5.00503 or higher.

  We update OPatch the same way we did previously, but in the ORACLE_HOME of the RDBMS.

  then,  we unzip the patch

     [TST][myoraserv].grid > cd /SOFT
     [TST][myoraserv].SOFT > unzip p19692824_112040_Linux-x86-64.zip -d patch

  We check that all the Oracle services running from this ORACLE_HOME are stopped (database, agents, console, listener, etc)

  Now, we apply the patch:

    [TST][myoraserv].SOFT > cd /SOFT/patch/19692824
    [TST][myoraserv].19692824 > $ORACLE_HOME/OPatch/opatch apply

 At the end of the process, appear some warnings:

    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'
    /bin/ld: warning: -z lazyload ignored.
    /bin/ld: warning: -z nolazyload ignored.


        OPatch found the word "warning" in the stderr of the make command.
    Please look at this stderr. You can re-run this make command.
    Stderr output:
    ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding recipe for target `nmosudo'
    /opt/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old recipe for target `nmosudo'

According to support note 1562458.1, those warnings can be safely ignored

Finally, as root, we run:

$ORACLE_HOME/root.sh


References:

- Installation walk-through - Oracle Grid/RAC 11.2.0.4 on Oracle Linux 7 (Doc ID 1951613.1)
- README of patches
- Bug 19947777
- Bug 22477834
- Relinking the DB Control 11.2.0.3 Agent Displays a Warning Message "overriding commands for target 'nmosudo'" (Doc ID 1562458.1)

No hay comentarios: