Oracle 19c RAC Step by Step Part 1 Installation of RHEL 7.8

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Step by Step Setup

Oracle 19c RAC


RHEL 7.8
Part 2 – Installation of RHEL 7.8
Preparation
Open Oracle Virtual Box

Create New Virtual Machine of type RHEL

Give name of your choice - I am choosing RHEL708-GOLD

Setup 2 Adapters
1. Internal Network
2. Bridged

Configure Base Memory of 8192 MB from System/Motherboard

Configure 2 Processors from System/Processor

Insert RHEL 7.8 disk from Storage Menu

Start the machine

Press I to install RHEL 7.8 (Red Hat Enterprise Linux 7.8)

Reboot

Install Guest Additions

Eject Guest Additions CD before shutting down

Shutdown the machine

Remove Guest Additions Disk from Storage if it’s present

Enable Clipboard via General/Advanced

Enable Shared Folder


Boot the machine

Note: All of the below commands has to be run as root unless


specified

Set the Hostname


hostnamectl set-hostname db1.db.com

reboot -h now

Configure IPs
192.168.0.101 - Private IP - Make sure to turn it on automatically
192.168.1.101 - Public IP - Make sure to turn it on automatically

## as root
vi /etc/hosts

127.0.0.1 localhost.db.com localhost


# Public
192.168.1.101 db1.db.com db1
192.168.1.102 db2.db.com db2
# Private
192.168.0.101 db1-priv.db.com db1-priv
192.168.0.102 db2-priv.db.com db2-priv
# Virtual
192.168.1.111 db1-vip.db.com db1-vip
192.168.1.112 db2-vip.db.com db2-vip
# SCAN
192.168.1.121 db-scan.db.com db-scan
192.168.1.122 db-scan.db.com db-scan
192.168.1.123 db-scan.db.com db-scan
Disable IPv6
Add the following lines to /etc/sysctl.conf:

ifconfig | grep inet

vi /etc/sysctl.conf

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

/sbin/sysctl -p

ifconfig | grep inet

Disable Firewall
systemctl disable firewalld
systemctl stop filewalld

Create users and groups


groupadd dba -g 1600

useradd -g dba -G dba,vboxsf -s /bin/bash oracle -u 1601


useradd -g dba -G dba,vboxsf -s /bin/bash grid -u 1602

echo "password" | passwd --stdin oracle


echo "password" | passwd --stdin grid

echo "%dba ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers


Redhat Local Repo

Insert Redhat 7.8 Installation Media

mkdir /cdrom
mount /dev/cdrom /cdrom

Create a .repo file

cp /cdrom/media.repo /etc/yum.repos.d/

cd /etc/yum.repos.d/
chmod 777 media.repo
mv redhat.repo redhat.repo.old

vi media.repo

[InstallMedia]
name=Red Hat Enterprise Linux 7.8
mediaid=1582647234.022611
metadata_expire=-1
gpgcheck=0
cost=500

enabled=1
baseurl=file:///cdrom/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

yum update
Install necessary packages
yum install -y compat-openssl10
yum install -y ksh
yum install -y libnsl
yum install -y sysstat
yum install -y xterm

Install oracle-database-preinstall
curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/
oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

cd /media/sf_D_DRIVE/VM_Softwares
rpm -i compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
rpm -i oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

cd /etc/security/limits.d/
ls -l
cat oracle-database-preinstall-19c.conf

https://yum.oracle.com/oracle-linux-7.html
https://yum.oracle.com/repo/OracleLinux/OL7/8/base/x86_64/index.html

Add below limits for Oracle and Grid User


vi /etc/security/limits.conf

grid soft stack 10240


oracle soft stack 10240
grid soft nofile 4096
grid hard nofile 63536

oracle soft nofile 4096


oracle hard nofile 63536
Install Oracle ASMLIB
mount /dev/cdrom /cdrom

yum install -y kmod-oracleasm

cd /media/sf_D_DRIVE/VM_Softwares/
rpm -i oracleasmlib-2.0.12-1.el7.x64.rpm
rpm -i oracleasm-support-2.1.11-2.el7.x64.rpm

https://www.oracle.com/linux/downloads/linux-asmlib-rhel7-downloads.html

Configure Oracle ASM


oracleasm configure -i

systemctl list-unit-files | grep asm

systemctl enable oracleasm.service


systemctl start oracleasm.service

systemctl list-unit-files | grep asm


Create Directories
mkdir /dbi
mkdir /dbi/oracle/
mkdir /dbi/oracle/V19BaseDatabase
mkdir /dbi/oracle/V19Database
mkdir /dbi/oracle/V19BaseGrid
mkdir /dbi/oracle/V19Grid

chmod 777 /dbi


chmod 777 /dbi/oracle/

chown oracle:dba /dbi/oracle/V19Database


chown oracle:dba /dbi/oracle/V19BaseDatabase

chown grid:dba /dbi/oracle/V19BaseGrid


chown grid:dba /dbi/oracle/V19Grid

cd /dbi/oracle; ls -l

Setup NTP Services (*3rd Adapter needed)


systemctl enable chronyd
systemctl restart chronyd

chronyc -a 'burst 4/4'


chronyc -a makestep

Shutdown the Machine.


Optional – add below line in oracle .bashrc
## ORACLE - /home/oracle/.bashrc
PATH=$PATH:$HOME/bin ; export PATH

TMP=/tmp ; export TMP


TMPDIR=$TMP ; export TMPDIR

ORACLE_SID=ora19c1 ; export ORACLE_SID


ORACLE_UNQNAME=ora19c ; export ORACLE_UNQNAME
ORACLE_GLOBAL_NAME=ora19c1.db.com ; export ORACLE_GLOBAL_NAME
ORACLE_BASE=/dbi/oracle/V19BaseDatabase ; export ORACLE_BASE
ORACLE_HOME=/dbi/oracle/V19Database ; export ORACLE_HOME
ORACLE_GRID=/dbi/oracle/V19Grid ; export ORACLE_GRID
ORACLE_HOSTNAME=db1.db.com ; export ORACLE_HOSTNAME

PATH=/usr/sbin:$PATH ; export PATH


PATH=$ORACLE_HOME/bin:$PATH ; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib ; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib ; export CLASSPATH
CLASSPATH=$ORACLE_HOME/JRE:$CLASSPATH ; export CLASSPATH
#export DISPLAY=192.168.1.6:7.0

Optional – add below line in grid .bashrc


## GRID - /home/grid/.bashrc
PATH=$PATH:$HOME/bin ; export PATH

TMP=/tmp ; export TMP


TMPDIR=$TMP ; export TMPDIR

ORACLE_SID=+ASM1 ; export ORACLE_SID


ORACLE_UNQNAME=+ASM1 ; export ORACLE_UNQNAME
ORACLE_GLOBAL_NAME=ora19c1.db.com ; export ORACLE_GLOBAL_NAME
ORACLE_BASE=/dbi/oracle/V19BaseGrid ; export ORACLE_BASE
ORACLE_HOME=/dbi/oracle/V19Grid ; export ORACLE_HOME
ORACLE_GRID=/dbi/oracle/V19Grid ; export ORACLE_GRID
ORACLE_HOSTNAME=db1.db.com ; export ORACLE_HOSTNAME

PATH=/usr/sbin:$PATH ; export PATH


PATH=$ORACLE_HOME/bin:$PATH ; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib ; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib ; export CLASSPATH
CLASSPATH=$ORACLE_HOME/JRE:$CLASSPATH ; export CLASSPATH
#export DISPLAY=192.168.1.6:7.0

You might also like