# Installing Oracle Database 11.2.0.3 RAC on OL 7.4

Operating System: Oracle Linux Server 7.4
Oracle Database: p10404530_112030_Linux-x86-64_{1..3}of7.zip
Database Patches:

# Packages Requirements

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}  (%{ARCH})\n' \
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel \
glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau \
libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel \
libxcb libibverbs make smartmontools sysstat pdksh gcc-c++ compat-libstdc++-33 \
gcc

・ Configuring Yum Repositories.

Installing Operating System Packages.

yum -y install \
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel \
glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau \
libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel \
libxcb libibverbs make smartmontools sysstat pdksh gcc-c++ compat-libstdc++-33 \
gcc

# Configuring Operating Systems for Oracle Grid Infrastructure on Linux

Create software directory.

mkdir /soft

Disabling Firewall and SElinux.

systemctl disable firewalld --now
sed -i '/SELINUX=/{s/enforcing/disabled/}' /etc/selinux/config

Disabling Zero Configuration Network.

cp -p /etc/sysconfig/network{,.bak.`date +%m%d`}
echo "NOZEROCONF=yes" >>/etc/sysconfig/network

Disabling Transparent Huagepages.

・ How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7, 8 and 9

Configuring Public, Private, Virtual and SCAN IP names and Addresses.

cat >>/etc/hosts <<EOF
192.168.3.210   exadb01
192.168.3.211   exadb02
192.168.3.212   exadb01-vip
192.168.3.213   exadb02-vip
192.168.3.214   exadb-scan
100.100.100.210 exadb01-priv
100.100.100.211 exadb02-priv
EOF

The SCAN name cannot more than 15 characters.

# Configuring Users, Groups and Environments for Oracle Grid Infrastructure and Oracle Database

Create Oracle software owner user accounts on each cluster node.

groupadd -g 1000 oinstall
groupadd -g 1200 asmadmin
groupadd -g 1201 asmdba
groupadd -g 1202 asmoper
groupadd -g 1300 dba
groupadd -g 1301 oper
useradd -u 1101 -g oinstall -G asmadmin,asmdba,asmoper,dba -m -d /home/grid -s /bin/bash -c "Grid Infrastructure Owner" grid
useradd -u 1100 -g oinstall -G dba,oper,asmdba,asmadmin -m -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
echo "grid" | passwd --stdin grid
echo "oracle" | passwd --stdin oracle

Create Grid home and Oracle home directories on each cluster node.

mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01

Configure Oracle Software owner user account environment on each cluster node.

cat >> /root/.bash_profile << "EOF"
# Oracle 11g
export GRID_HOME=/u01/app/11.2.0/grid
EOF
cat >> /home/grid/.bash_profile << "EOF"
# Oracle 11g
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export GRID_HOME=$ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if command -v rlwrap >/dev/null 2>&1; then
  alias sqlplus='rlwrap sqlplus'
fi
EOF
cat >> /home/oracle/.bash_profile << "EOF"
# Oracle 11g
export ORACLE_SID=coco1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if command -v rlwrap >/dev/null 2>&1; then
  alias sqlplus='rlwrap sqlplus'
  alias rman='rlwrap rman'
fi
EOF

# Completing Preinstallation Tasks Manually

# Configuring SSH Manually on All Cluster Nodes

Login as grid user, create SSH keys on each node.

~]$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa

Copy keys to a remote authorized_keys file.

~]$ ssh-copy-id exadb01
~]$ ssh-copy-id exadb02

Verifying SSH user equivalency on cluster nodes without being prompted for a password.

~]$ ssh exadb02 date
Sun Jun  4 19:04:35 CST 2023
~]$ ssh exadb01 date
Sun Jun  4 19:05:07 CST 2023

Repeat as oracle user.

# Configuring Storage Device Path Persistence Using Oracle ASMLIB

・ Configuring Storage Device Path Persistence Using Oracle ASMLIB on RHEL

# Configuring Kernel Parameters for Linux

Create or edit the /etc/sysctl.d/97-oracle-database-11g-sysctl.conf file, and add or edit lines similar to:

cat > /etc/sysctl.d/97-oracle-database-11g-sysctl.conf << EOF
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
EOF
sysctl --system

# Configuring Resource Limits for Oracle Software Installation Users

cat > /etc/security/limits.d/97-oracle-database-11g-limits.conf << EOF
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728
grid   soft   nofile    1024
grid   hard   nofile    65536
grid   soft   nproc    16384
grid   hard   nproc    16384
grid   soft   stack    10240
grid   hard   stack    32768
grid   hard   memlock    134217728
grid   soft   memlock    134217728
EOF

# Installing Oracle Grid Infrastructure for a New Cluster

  1. Unzip GI Software file.

    ~]# chmod -R 775 /soft
    ~]# chown -R grid:oinstall /soft
    # Log in as grid user
    [grid@exadb01 ~]$ cd /soft
    [grid@exadb01 soft]$ unzip -q p13390677_112040_Linux-x86-64_3of7.zip
  2. Installing the cvuqdisk RPM for Linux.

    ~]# set CVUQDISK_GRP=oinstall
    ~]# rpm -ivh /soft/grid/rpm/cvuqdisk-1.0.9-1.rpm
  3. Using CVU to Determine if Installation Prerequisites are Complete.

    [grid@exadb01 ~]$ cd /soft/grid
    [grid@exadb01 grid]$ ./runcluvfy.sh stage -pre crsinst -fixup -n exadb01,exadb02 -verbose
  4. Log in as the grid user, run installer.

    /soft/grid/runInstaller

# Installing the Oracle Database Software

  1. Download and change the Oracle Database image files permissions.

    chown -R oracle:oinstall /soft/p10404530_112030_Linux-x86-64_[12]of7.zip
  2. Log in as the oracle user, extract the files into the Oracle home.

    unzip -q -d /soft /soft/p10404530_112030_Linux-x86-64_1of7.zip
    unzip -q -d /soft /soft/p10404530_112030_Linux-x86-64_2of7.zip
  3. Log in as the oracle user, run installer.

    /soft/database/runInstaller

# Installation Errors for Oracle 11.2.0.3 RAC on OL 7.4

# runInstaller start failed due could not execute xdpyinfo.

・ runInstaller start failed due could not execute xdpyinfo

# error while loading shared libraries: libcap.so.1

Loading shared libraries: libcap.so.1 fails when running root.sh on the first node.

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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
Failed to create keys in the OLR, rc = 127, Message:
  /u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 7660.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

Solution:

Install compat-libcap1 package.

~]# yum provides libcap.so.1
Loaded plugins: ulninfo
compat-libcap1-1.10-7.el7.i686 : Library for getting and setting POSIX.1e capabilities
Repo        : InstallMedia
Matched from:
Provides    : libcap.so.1
~]# yum -y install compat-libcap1
Edited on