Oracle Database 18c Silent Installation On RHEL 7

This blog describes silent installation and configuration of Grid Infrastructure 18c (64bit) and Oracle Database 18c (64bit) on RHEL 7. The implementation described in this blog is based on a server installation with a minimum resource allocations required by Oracle.

Download Software

Download software from OTN

  • Database 18c (18.3) for Linux x86-64
  • Grid Infrastructure (18.3) for Linux x86-64 (

Pre-installation Tasks

Oracle recommends that you disable THP on all Oracle Database servers and rather use standard HugePages for enhanced performance.

Oracle recommends that you instead use standard HugePages for enhanced performance

Ensure the /etc/hosts file to contain the IP and FQDN of the server. localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 dbhost.local dbhost

Ensure the correct hostname in the “/etc/hostname” file.

Identify your ASM disk by adding them to the to /etc/udev/rules.d/97-oracleasm.rules

OWNER="grid", GROUP="asmadmin", MODE="0660", ENV{DEVTYPE}=="disk", KERNEL=="xvdca", SYMLINK+="oracleasm/disks/DATA1"
OWNER="grid", GROUP="asmadmin", MODE="0660", ENV{DEVTYPE}=="disk", KERNEL=="xvdcb", SYMLINK+="oracleasm/disks/FRA1"

Reload udev rules

# udevadm control --reload-rules
# udevadm trigger

Run the following command to initialize ASM disks

# for dsk in `ls /dev/oracleasm/disks/*`; do echo 'initializing ',${dsk}; dd if=/dev/zero of=${dsk} bs=4096 count=1; done 

Adjust your Linux kernels as needed for your environment by adding the necessary entries and values in the /etc/sysctl.conf.

Reload the updated Linux kernels by running the following command:

# sysctl -p

Adjust system resources available to oracle and grid OS user process by adding the necessary enrties and values in the /etc/security/limits.d/oracle-database-preinstall-18c.conf.

Install the following required OS packages required for RHEL 7.

# yum install -y bc binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf.i686 elfutils-libelf elfutils-libelf-devel.i686 elfutils-libelf-devel fontconfig-devel glibc.i686 glibc glibc-devel.i686 glibc-devel ksh libaio.i686 libaio libaio-devel.i686 libaio-devel libX11.i686 libX11 libXau.i686 libXau libXi.i686 libXi libXtst.i686 libXtst libgcc.i686 libgcc librdmacm-devel libstdc++.i686 libstdc++ libstdc++-devel.i686 libstdc++-devel libxcb.i686 libxcb make nfs-utils net-tools python python-configshell python-rtslib python-six smartmontools sysstat targetcli unixODBC

Create the OS users and groups for the Oracle software stack

# groupadd oinstall
# groupadd dba
# groupadd bckpdba
# groupadd dgdba
# groupadd kmdba
# groupadd asmoper
# groupadd asmadmin
# groupadd asmdba
# useradd -g oinstall -G dba,bckpdba,dgdba,kmdba,asmoper,asmadmin oracle
# useradd -g oinstall -G dba,asmoper,asmadmin grid

Ensure secure Linux is set to “targeted” in /etc/selinux/config

SELINUX= can take one of these three values:
 enforcing - SELinux security policy is enforced.
 permissive - SELinux prints warnings instead of enforcing.
 disabled - No SELinux policy is loaded.
 SELINUXTYPE= can take one of three two values:
 targeted - Targeted processes are protected,
 minimum - Modification of targeted policy. Only selected processes are protected.
 mls - Multi Level Security protection.

Create software directories as needed. In my case I will simply assign ownership of an entire mountpoint

# chown -R oracle:oinstall /u01
# chmod 770 /u01

Grid Infrastructure Installation & Configuration Tasks (Silent Mode) 

Login as the grid OS user and perform the following actions

Add the following lines to the /home/grid/.bash_profile

ORACLE_BASE=/u01/grid/base; export ORACLE_BASE
GRID_HOME=/u01/grid/home; export GRID_HOME

Source the grid OS user bash profile

$ source ~/.bash_profile

Add the following lines in /home/grid/gi_soft.rsp in-order to create the response file for silent software installation.

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v18.0.0 INVENTORY_LOCATION=/u01/oraInventory oracle.install.option=HA_CONFIG ORACLE_BASE=/u01/grid/base oracle.install.asm.OSDBA=oinstall oracle.install.asm.OSASM=asmadmin oracle.install.asm.storageOption=ASM oracle.install.asm.SYSASMPassword=putYourPassword oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/FRA1 oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/* oracle.install.asm.monitorPassword=putYourPassword oracle.install.asm.configureAFD=false 

Unzip grid 18c software

$ mkdir -p /u01/grid/home
$ unzip /software_download/ -d /u01/grid/home

Invoke OUI silent installation

$ /u01/grid/home/ -silent -responseFile /home/grid/gi_soft.rsp

After installation, execute post installation script as root OS user

# /u01/oraInventory/
# /u01/grid/home/[

Run the following command to complete GI configuration

$ /u01/grid/home/ -executeConfigTools -responseFile /home/grid/gi_soft.rsp -silent

Confirm +ASM instance is running

$ ps -ef | grep smon

Confirm +DATA diskgroup is created with the correct settings EXTERNAL redundancy

$ asmcmd lsdg

Create remaining ASM diskgroups that will be used by the database

$ asmca -silent -createDiskGroup -diskString '/dev/oracleasm/disks/*' -diskGroupName FRA -disk '/dev/oracleasm/disks/FRA*' -redundancy EXTERNAL -au_size 4

Database Server Installation Tasks (Silent)

Login as the oracle OS user and perform the following actions

Add the following lines to the /home/oracle/.bash_profile

ORACLE_BASE=/u01/app; export ORACLE_BASE
ORACLE_HOME=/u01/app/18R3; export ORACLE_HOME
export ORACLE_SID=testdb

Source the profile

$ source ~/.bash_profile

Add the following lines in /home/oracle/db_soft_only.rsp in-order to create the response file for silent software only installation.

 oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v18.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/oraInventory ORACLE_HOME=/u01/app/18R3 ORACLE_BASE=/u01/app oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=dba oracle.install.db.OSBACKUPDBA_GROUP=bckpdba oracle.install.db.OSDGDBA_GROUP=dgdba oracle.install.db.OSKMDBA_GROUP=kmdba oracle.install.db.OSRACDBA_GROUP=dba SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true oracle.installer.autoupdates.option=SKIP_UPDATES 

Unzip oracle database 18c software

$ unzip /software_download/ -d /u01/app/18R3

Invoke OUI silent installation

$ u01/app/18R3/runInstaller -silent -responseFile ~/db_soft_only.rsp

Upon installation completion, execute the post installation scripts as root OS user

# /u01/app/18R3/

Database Creation Tasks (Silent)

Login as the oracle OS user and perform the following actions

Use the command below to create a general purpose transaction database

$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName $ORACLE_SID -sid $ORACLE_SID -sysPassword putYOURPASSWORD -systemPassword putYOURPASSWORD -storageType ASM -diskGroupName +DATA -recoveryGroupName +FRA -responseFile NO_VALUE -createAsContainerDatabase false -characterSet AL32UTF8 -nationalCharacterSet AL16UTF16 -archiveLogMode true -databaseType MULTIPURPOSE -emConfiguration NONE

Confirm database instance is running and database is open (READ WRITE)

 ps -ef | grep smon
SQL> select open_mode from v$database;