User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

This article will show step by step an installation of Oracle Grid Infrastructure 12cR2 for a Standalone Server on Oracle Linux 7 using ASM Filter Driver (ASMFD).

For this installation, you needs
- root access
- 4GB of RAM or more
- 3 disks of 20GB or more

Before starting, you should have ...
- Oracle Linux 7 already installed (if not, check Oracle Linux 7 install)
- Oracle Linux 7 already configured for Oracle 12c (if not, check how to configure Linux for Oracle DB)

If you want install for a cluster instead, check Install Oracle Grid Infrastructure 12cR2 for RAC.

Requirements

System/Hardware

Oracle Linux Kernel

  • Oracle Linux 7 with the Unbreakable Enterprise Kernel 3: 3.8.13-35.3.1.el7uek.x86_64 or later
  • Oracle Linux 7.2 with the Unbreakable Enterprise Kernel 4: 4.1.12-32.2.3.el7uek.x86_64 or later
  • Oracle Linux 7 with the Red Hat Compatible kernel: 3.10.0-123.el7.x86_64 or later
# Check Kernel
[user]$ uname -mr
    4.1.12-94.5.7.el7uek.x86_64 x86_64

4GB Physical memory or more

# Check RAM - 1st method
[user]$ free -m
                  total        used        free      shared  buff/cache   available
    Mem:           8989        1410        5378         649        2201        6710
    Swap:          9211           0        9211

# Check RAM - 2nd method
[user]$ grep MemTotal /proc/meminfo
    MemTotal:        9205756 kB

Swap space equals to RAM (up to 16GB)

# Check Swap - 1st method
[user]$ free -m
                  total        used        free      shared  buff/cache   available
    Mem:           8989        1410        5378         649        2201        6710
    Swap:          9211           0        9211

# Check Swap - 2nd method
[user]$ grep SwapTotal  /proc/meminfo
    SwapTotal:       9433084 kB

2GB disk space for temporary directory (or more)

# Check Tmp space
[user]$ df -m /tmp
    Filesystem                   1M-blocks  Used Available Use% Mounted on
    /dev/mapper/ol_oralab01-root     14326  5231      9096  37% /

Install files requirements

You will need to download Oracle Grid Infrastructure files (a free Oracle account is required):

  • Go to Oracle Software Downloads page
  • Under "Oracle Database 12c Release 2", Click on "See All" for "Linux x86-64"
  • Accept License Agreement on the top
  • Under "Oracle Database 12c Release 2 Grid Infrastructure (12.2.0.1.0) for Linux x86-64", click on the download link "linuxx64_12201_grid_home.zip"
  • Log in if you already have a Oracle account, or Create a new account for free

Install Oracle Grid Infrastructure

First, make sure that Oracle Linux 7 is already configured for Oracle 12c (if not, check how to configure Linux for Oracle DB)

Unpack installation files

Connect as grid user, and unzip the software file previously downloaded as follow:

# unzip file to GRID_HOME
[grid]$ unzip /mnt/nfs/ora_instfiles/Oracle12c/linuxx64_12201_grid_home.zip -d /u01/app/12.2.0/grid/.

Provisioning ASM Filter Driver Disks

We need to initialise/provision disks which will be presented to ASM.
As root user, execute these commands:

# ASM Disk Provisioning
[root]$ export ORACLE_HOME=/u01/app/12.2.0/grid
[root]$ cd $ORACLE_HOME/bin/
[root]$ ./asmcmd afd_label DISK01 /dev/sda --init
[root]$ ./asmcmd afd_label DISK02 /dev/sdb --init
[root]$ ./asmcmd afd_label DISK03 /dev/sdc --init

# For lot of disks, you can use this loop:
# i=0; for j in {a..c}; do i=$((i+1)); ./asmcmd afd_label DISK0${i} /dev/sd${j} --init; done

# Check if disks have been marked for ASM
[root]$ ./asmcmd afd_lslbl '/dev/sd*'
    ----------------------------------------------
    Label                 Duplicate  Path
    ==============================================
    DISK01                            /dev/sda
    DISK02                            /dev/sdb
    DISK03                            /dev/sdc

[root]$ ls -alrt /dev/oracleafd/disks/
    -rwxrwx--- 1 grid oinstall 22 Aug  1 21:31 /dev/oracleafd/disks/DISK01
    -rwxrwx--- 1 grid oinstall 22 Aug  1 21:34 /dev/oracleafd/disks/DISK02
    -rwxrwx--- 1 grid oinstall 22 Aug  1 21:34 /dev/oracleafd/disks/DISK03

Then we need to create a udev rule to change the disks owner to grid:asmadmin.
As root user, execute these commands:

# Check asm disk with udevadm info
[root]$ udevadm info /dev/sda | grep oracleasm
    E: ID_FS_TYPE=oracleasm

# Create asm udev rule to change disk owner
[root]$ cat > /etc/udev/rules.d/99-oracleasm.rules <<EOF
    KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="oracleasm", OWNER="grid", GROUP="asmadmin", MODE="0660"
EOF

# Reload udev rules
[root]$ udevadm control --reload-rules && udevadm trigger

# Check if rule is applied
[root]$ ls -l /dev/sd*
    brw-rw---- 1 grid asmadmin 8,  0 Aug 18 08:55 /dev/sda
    brw-rw---- 1 grid asmadmin 8, 16 Aug 18 08:55 /dev/sdb
    brw-rw---- 1 grid asmadmin 8, 32 Aug 18 08:55 /dev/sdc

Pre-install verification

Still as grid user, run the verification utility script as follow:

# Verification utility
[grid]$ cd /u01/app/12.2.0/grid/
[grid]$ ./runcluvfy.sh stage -pre hacfg -fixupnoexec
    Verifying Physical Memory ...PASSED
    Verifying Available Physical Memory ...PASSED
    Verifying Swap Size ...PASSED
    Verifying Free Space: oralab01:/usr,oralab01:/var,oralab01:/etc,oralab01:/sbin,oralab01:/tmp ...PASSED
    Verifying User Existence: grid ...
      Verifying Users With Same UID: 54322 ...PASSED
    Verifying User Existence: grid ...PASSED
    Verifying Group Existence: dba ...PASSED
    Verifying Group Existence: oinstall ...PASSED
    Verifying Group Membership: dba ...PASSED
    Verifying Group Membership: oinstall(Primary) ...PASSED
    Verifying Run Level ...PASSED
    Verifying Hard Limit: maximum open file descriptors ...PASSED
    Verifying Soft Limit: maximum open file descriptors ...PASSED
    Verifying Hard Limit: maximum user processes ...PASSED
    Verifying Soft Limit: maximum user processes ...PASSED
    Verifying Soft Limit: maximum stack size ...PASSED
    Verifying Architecture ...PASSED
    Verifying OS Kernel Version ...PASSED
    Verifying OS Kernel Parameter: semmsl ...PASSED
    Verifying OS Kernel Parameter: semmns ...PASSED
    Verifying OS Kernel Parameter: semopm ...PASSED
    Verifying OS Kernel Parameter: semmni ...PASSED
    Verifying OS Kernel Parameter: shmmax ...PASSED
    Verifying OS Kernel Parameter: shmmni ...PASSED
    Verifying OS Kernel Parameter: shmall ...PASSED
    Verifying OS Kernel Parameter: file-max ...PASSED
    Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
    Verifying OS Kernel Parameter: rmem_default ...PASSED
    Verifying OS Kernel Parameter: rmem_max ...PASSED
    Verifying OS Kernel Parameter: wmem_default ...PASSED
    Verifying OS Kernel Parameter: wmem_max ...PASSED
    Verifying OS Kernel Parameter: aio-max-nr ...PASSED
    Verifying OS Kernel Parameter: panic_on_oops ...PASSED
    Verifying Package: binutils-2.23.52.0.1 ...PASSED
    Verifying Package: compat-libcap1-1.10 ...PASSED
    Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
    Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
    Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
    Verifying Package: sysstat-10.1.5 ...PASSED
    Verifying Package: ksh ...PASSED
    Verifying Package: make-3.82 ...PASSED
    Verifying Package: glibc-2.17 (x86_64) ...PASSED
    Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
    Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
    Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
    Verifying Package: nfs-utils-1.2.3-15 ...PASSED
    Verifying Package: smartmontools-6.2-4 ...PASSED
    Verifying Package: net-tools-2.0-0.17 ...PASSED
    Verifying Users With Same UID: 0 ...PASSED
    Verifying Current Group ID ...PASSED
    Verifying Root user consistency ...PASSED

    Pre-check for Oracle Restart configuration was successful.

    CVU operation performed:      stage -pre hacfg
    Date:                         28-Sep-2017 01:52:47
    CVU home:                     /u01/app/12.2.0/grid/
    User:                         grid

Install

If you prefer "interactive GUI install" instead of "silent install", just run $GRID_HOME/gridSetup.sh without option. (for X11 forwarding check XDISPLAY over SSH with Putty & Xming/VcXsrv)

Silent mode install

As grid user, execute installation script :

 # GI software install (silent mode)
[grid]$ GRID_BASE=/u01/app/grid
[grid]$ GRID_HOME=/u01/app/12.2.0/grid

# Make sure GRID_BASE is empty, if not empty it with:
# rm -fr $GRID_BASE/*

[grid]$ $GRID_HOME/gridSetup.sh -silent \
  -responseFile $GRID_HOME/install/response/gridsetup.rsp \
  ORACLE_BASE=$GRID_BASE \
  INVENTORY_LOCATION=/u01/app/oraInventory \
  oracle.install.option=HA_CONFIG \
  oracle.install.asm.OSDBA=asmdba \
  oracle.install.asm.OSOPER=asmoper \
  oracle.install.asm.OSASM=asmadmin \
  oracle.install.asm.storageOption=ASM \
  oracle.install.asm.SYSASMPassword=AsmSys_pw0 \
  oracle.install.asm.diskGroup.name=DATA \
  oracle.install.asm.diskGroup.redundancy=EXTERNAL \
  oracle.install.asm.diskGroup.disks=/dev/sda,/dev/sdb,/dev/sdc \
  oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sd* \
  oracle.install.asm.monitorPassword=AsmMon_pw0 \
  oracle.install.asm.configureGIMRDataDG=false \
  oracle.install.asm.configureAFD=true \
  -waitForCompletion

    Launching Oracle Grid Infrastructure Setup Wizard...

    You can find the log of this install session at:
     /u01/app/oraInventory/logs/GridSetupActions2017-09-28_01-58-48AM/gridSetupActions2017-09-28_01-58-48AM.log

    As a root user, execute the following script(s):
            1. /u01/app/12.2.0/grid/root.sh

    Execute /u01/app/12.2.0/grid/root.sh on the following nodes:
    [oralab01]



    Successfully Setup Software.
    As install user, execute the following command to complete the configuration.
            /u01/app/12.2.0/grid/gridSetup.sh -executeConfigTools -responseFile /u01/app/12.2.0/grid/install/response/gridsetup.rsp [-silent]

 

As a root user, execute the following script:

 # GI Install root script
[root]$ /u01/app/12.2.0/grid/root.sh
    Check /u01/app/12.2.0/grid/install/root_oralab01.uxora.com_2017-09-28_02-00-30-081315805.log for the output of root script


[root]$ cat /u01/app/12.2.0/grid/install/root_oralab01.uxora.com_2017-09-28_02-00-30-081315805.log
    Performing root user operation.

    The following environment variables are set as:
        ORACLE_OWNER= grid
        ORACLE_HOME=  /u01/app/12.2.0/grid
       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.
    Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
    The log of current session can be found at:
      /u01/app/grid/crsdata/oralab01/crsconfig/roothas_2017-09-28_02-00-30AM.log
    LOCAL ADD MODE
    Creating OCR keys for user 'grid', 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 oralab01 successfully pinned.
    2017/09/28 02:00:49 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oralab01'
    CRS-2673: Attempting to stop 'ora.evmd' on 'oralab01'
    CRS-2677: Stop of 'ora.evmd' on 'oralab01' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oralab01' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.

    oralab01     2017/09/28 02:02:19     /u01/app/12.2.0/grid/cdata/oralab01/backup_20170928_020219.olr     0
    2017/09/28 02:02:20 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

 

As a grid user, execute the following command to complete the configuration:

# GI install configuration script
[grid]$ $GRID_HOME/gridSetup.sh -silent -executeConfigTools \
  -responseFile $GRID_HOME/install/response/gridsetup.rsp \
  ORACLE_BASE=$GRID_BASE \
  INVENTORY_LOCATION=/u01/app/oraInventory \
  oracle.install.option=HA_CONFIG \
  oracle.install.asm.OSDBA=asmdba \
  oracle.install.asm.OSOPER=asmoper \
  oracle.install.asm.OSASM=asmadmin \
  oracle.install.asm.storageOption=ASM \
  oracle.install.asm.SYSASMPassword=AsmSys_pw0 \
  oracle.install.asm.diskGroup.name=DATA \
  oracle.install.asm.diskGroup.redundancy=EXTERNAL \
  oracle.install.asm.diskGroup.disks=/dev/sda,/dev/sdb,/dev/sdc \
  oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sd* \
  oracle.install.asm.monitorPassword=AsmMon_pw0 \
  oracle.install.asm.configureGIMRDataDG=false \
  oracle.install.asm.configureAFD=true \
  -waitForCompletion

    Launching Oracle Grid Infrastructure Setup Wizard...

    You can find the logs of this session at:
    /u01/app/oraInventory/logs/GridSetupActions2017-09-28_02-06-52AM

    Successfully Configured Software.

Installation finished.

Post Installation

List status ressources

[grid]$ crsctl stat res -t
    ------------------------------------------------------------------------
    Name           Target  State        Server           State details
    ------------------------------------------------------------------------
    Local Resources
    ------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       oralab01         STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       oralab01         STABLE
    ora.asm
                   ONLINE  ONLINE       oralab01         Started,STABLE
    ora.ons
                   OFFLINE OFFLINE      oralab01         STABLE
    ------------------------------------------------------------------------
    Cluster Resources
    ------------------------------------------------------------------------
    ora.cssd
          1        ONLINE  ONLINE       oralab01         STABLE
    ora.diskmon
          1        OFFLINE OFFLINE                       STABLE
    ora.evmd
          1        ONLINE  ONLINE       oralab01         STABLE
    ------------------------------------------------------------------------

What's next ...

Please leave comments and suggestions,
Michel.

Reference
Grid Infrastructure Installation Guide (docs.oracle.com)
Oracle Grid Infrastructure installation requirement (docs.oracle.com)

Enjoyed this article? Please like it or share it.

Add comment

Please connect with one of social login below (or fill up name and email)

     


Security code
Refresh