This is the first blog post about the recent release 12.2.0.1 of Oracle Grid Infrastructure. In the next lines I will demonstrate how to install Grid Infrastructure for a standalone server (Oracle Restart) without the Automatic Storage Management (ASM) component silently.
Table of Contents
Reasons to install Grid Infrastructure
When you want to increase the availability of the resources of your single instance, you can use Grid Infrastructure to monitor the resources like the listener or an Oracle database and in the case of an error to restart them automatically.
Automatic Storage Management (ASM)
Using the installation wizard, the Automatic Storage Management (ASM) component installation cannot be skipped. Furthermore you have to create an initial ASM diskgroup – of course you can create a fake device using dd and use it. But if you don’t has the requirement to use ASM, you can only skip its configuration, using the silent method.
Preparation
Operating System
The configuration of the operating system is not part of this blog post. Check the Oracle documentation or My Oracle Support to find out the necessary steps.
Download ZIP file
Download the ZIP file from Oracle Technology Network (file name: linuxx64_12201_grid_home.zip) or from the Oracle Software Delivery Cloud (file name: V840012-01.zip).
Starting with Oracle 12c Release 2 the ZIP file of the Grid Infrastructure has to extract into the final Oracle Home directory – in my case I use /u00/app/grid/product/12.2.0.1.
$> unzip -d /u00/app/grid/product/12.2.0.1 V840012-01.zip[/bash]
Run Cluster Verification Utility (CVU)
To check the system if it is ready for the installation of Grid Infrastructure, you can use the Cluster Verification Utility (CVU).
$> cd /u00/app/grid/product/12.2.0.1
$> ./runCluvfy.sh stage -pre hacfg -verbose
Installation
Prepare response file
Either you can write the response file completely by your own or – the easier way – use the response file gridsetup.rsp which is shipped with Grid Infrastructure.
$> cd /u00/app/grid/product/12.2.0.1/install/response
$> vi grid_setup.rsp
Update the highlighted parameters corresponding to your environment.
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v12.2.0
INVENTORY_LOCATION=/u00/app/oraInventory
oracle.install.option=CRS_SWONLY
ORACLE_BASE=/u00/app/oracle
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=
oracle.install.crs.config.gpnp.scanPort=
oracle.install.crs.config.ClusterConfiguration=
oracle.install.crs.config.configureAsExtendedCluster=
oracle.install.crs.config.memberClusterManifestFile=
oracle.install.crs.config.clusterName=
oracle.install.crs.config.gpnp.configureGNS=
oracle.install.crs.config.autoConfigureClusterNodeVIP=
oracle.install.crs.config.gpnp.gnsOption=
oracle.install.crs.config.gpnp.gnsClientDataFile=
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.sites=
oracle.install.crs.config.clusterNodes=
oracle.install.crs.config.networkInterfaceList=
oracle.install.asm.configureGIMRDataDG=
oracle.install.crs.config.storageOption=
oracle.install.crs.config.useIPMI=
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.storageOption=
oracle.install.asmOnNAS.ocrLocation=
oracle.install.asmOnNAS.configureGIMRDataDG=
oracle.install.asmOnNAS.gimrLocation=
oracle.install.asm.SYSASMPassword=
oracle.install.asm.diskGroup.name=
oracle.install.asm.diskGroup.redundancy=
oracle.install.asm.diskGroup.AUSize=
oracle.install.asm.diskGroup.FailureGroups=
oracle.install.asm.diskGroup.disksWithFailureGroupNames=
oracle.install.asm.diskGroup.disks=
oracle.install.asm.diskGroup.quorumFailureGroupNames=
oracle.install.asm.diskGroup.diskDiscoveryString=
oracle.install.asm.monitorPassword=
oracle.install.asm.gimrDG.name=
oracle.install.asm.gimrDG.redundancy=
oracle.install.asm.gimrDG.AUSize=
oracle.install.asm.gimrDG.FailureGroups=
oracle.install.asm.gimrDG.disksWithFailureGroupNames=
oracle.install.asm.gimrDG.disks=
oracle.install.asm.gimrDG.quorumFailureGroupNames=
oracle.install.asm.configureAFD=
oracle.install.crs.configureRHPS=
oracle.install.crs.config.ignoreDownNodes=
oracle.install.config.managementOption=
oracle.install.config.omsHost=
oracle.install.config.omsPort=
oracle.install.config.emAdminUser=
oracle.install.config.emAdminPassword=
oracle.install.crs.rootconfig.executeRootScript=
oracle.install.crs.rootconfig.configMethod=
oracle.install.crs.rootconfig.sudoPath=
oracle.install.crs.rootconfig.sudoUserName=
oracle.install.crs.config.batchinfo=
oracle.install.crs.app.applicationAddress=
Run gridSetup.sh
Starting with 12.2.0.1 the gridSetup.sh script is used to execute the setup of the Grid Infrastructure.
$> cd /u00/app/grid/product/12.2.0.1
$> ./gridSetup.sh -silent -responseFile /u00/app/grid/product/12.2.0.1/install/response/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. gridSetupActions2017-04-21_02-22-35PM.log
ACTION: Identify the list of failed prerequisite checks from the log: gridSetupActions2017-04-21_02-22-35PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/tmp/GridSetupActions2017-04-21_02-22-35PM/gridSetupActions2017-04-21_02-22-35PM.log
As a root user, execute the following script(s):
1. /u00/app/oraInventory/orainstRoot.sh
2. /u00/app/grid/product/12.2.0.1/root.sh
Execute /u00/app/oraInventory/orainstRoot.sh on the following nodes:
[ora01]
Execute /u00/app/grid/product/12.2.0.1/root.sh on the following nodes:
[ora01]
Execute root scripts
To complete the installation, the following scripts have to be executed as root user.
$> /u00/app/oraInventory/orainstRoot.sh
Changing permissions of /u00/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u00/app/oraInventory to oinstall.
The execution of the script is complete.
$> /u00/app/grid/product/12.2.0.1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u00/app/grid/product/12.2.0.1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
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.
To configure Grid Infrastructure for a Cluster or Grid Infrastructure for a Stand-Alone Server execute the following command as oracle user:
/u00/app/grid/product/12.2.0.1/gridSetup.sh
This command launches the Grid Infrastructure Setup Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.
Configure Grid Infrastructure
The next step is mandatory to get the Grid Infrastructure stack running. To configure the Grid Infrastructure for a standalone server, the following script has to be executed as root.
$> cd /u00/app/grid/product/12.2.0.1/crs/install
$> ./roothas.sh
Using configuration parameter file: /u00/app/grid/products/12.2.0.1/crs/install/crsconfig_params
The log of current session can be found at:
/u00/app/oracle/crsdata/ora01/crsconfig/roothas_2017-04-21_02-51-08PM.log
2017/04/21 14:51:11 CLSRSC-363: User ignored prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'oracle', 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 ora01 successfully pinned.
2017/04/21 14:51:17 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ora01'
CRS-2673: Attempting to stop 'ora.evmd' on 'ora01'
CRS-2677: Stop of 'ora.evmd' on 'ora01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ora01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
ora01 2017/04/21 14:52:21 /u00/app/grid/product/12.2.0.1/cdata/ora01/backup_20170421_145221.olr 0
As final step of the configuration, the resource ora.cssd has to be started. Otherwise interacting with resources using srvctl fails with PRCD-1024 and PRCR-1055 errors.
$> cd /u00/app/grid/product/12.2.0.1/bin
$> ./crsctl start resource ora.cssd -unsupported
Post Tasks
Add Listener
If required a default listener can be added. After settting the environment (e.g. ORACLE_HOME, PATH etc), run netca with the default response file netca_typ.rsp.
$> export ORACLE_BASE=/u00/app/oracle
$> export ORACLE_HOME=/u00/app/grid/product/12.2.0.1
$> export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
$> export PATH=$ORACLE_HOME/bin:$PATH
$> netca -silent -responseFile $ORACLE_HOME/network/install/netca_typ.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u00/app/grid/product/12.2.0.1/network/install/netca_typ.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
Conclusion
Unfortunately the Oracle Universal Installer does not provide a method to skip the configuration of ASM. To get rid of this part, the only way is to perform a software-only installation and run the necessary configuration manually. The result is the following list of resources running on the server.
$> crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE ora01 STABLE
ora.ons
OFFLINE OFFLINE ora01 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE ora01 STABLE
--------------------------------------------------------------------------------