Showing posts with label ORACLE 19c RAC INSTALLATION GUIDE. Show all posts
Showing posts with label ORACLE 19c RAC INSTALLATION GUIDE. Show all posts

Saturday, 23 May 2026

ORACLE 19c RAC INSTALLATION GUIDE

                                           ORACLE 19c RAC

INSTALLATION GUIDE

With Real Installation Screenshots

Grid Infrastructure  •  ASM Disk  •  DNS/SCAN  •  Oracle Database

1. GRID INFRASTRUCTURE INSTALLATION

 

Steps 1–5: OS Installation, Network, Firewall & Oracle Pre-install

S.NO

STEPS / COMMANDS

DESCRIPTION

1

OEL 7.9 Installation

Install Oracle Enterprise Linux 7.9 on Node1 and Node2.

2

Configure: PUBLIC / PRIVATE / INTERNET

Set up three NICs: Public (SSH), Private (RAC interconnect), Internet.

3

systemctl stop firewalld

systemctl disable firewalld

Disable firewall permanently on both nodes.

4

yum install -y oracle-database-preinstall-19c

Installs Oracle user, sets kernel params, installs dependency packages.

5

passwd oracle

Set password for oracle OS user.

 

Figure: Steps 4–5: oracle-database-preinstall-19c installation & oracle password setup

Steps 6–12: ASM Packages, Groups & Users

S.NO

STEPS / COMMANDS

DESCRIPTION

6

yum install -y oracleasm-support

rpm -qa | grep oracleasm-support

oracleasm-support: tools to configure/manage ASM devices and init scripts.

7

yum install -y kmod-oracleasm

Kernel module for Oracle ASM. Provides oracleasm configure/init/scandisks.

8

groupadd asmadmin

ASM admin group: SYSASM, start/stop ASM, create/drop disk groups.

9

groupadd asmdba

ASM DBA group: database instances access ASM disks.

10

useradd -u 54323 -g oinstall -G asmadmin,asmdba grid

Create GRID user with UID 54323 for cluster-wide consistency.

11

getent group asmadmin

# asmadmin:x:54331:grid

Verify groups created and grid user is a member.

12

passwd grid

Set password for GRID OS user.

 


Figure: Steps 8–12: Creating asmadmin/asmdba groups, grid user, oracle user group assignments

Steps 13–19: User Permissions, Directories, .bash_profile & ASMLib

S.NO

STEPS / COMMANDS

DESCRIPTION

13

usermod -a -G asmdba oracle

usermod -G backupdba,dba,oinstall,racdba,kmdba,dgdba,oper oracle

Add oracle to all required OS groups for full DBA privileges.

14

mkdir -p /u01/app/oracle/product/19C/dbhome

chown -R oracle:oinstall /u01

chmod -R 775 /u01

mkdir -p /u02/app/grid/product/19C/dbhome

chown -R grid:oinstall /u02

chmod -R 775 /u02

Create ORACLE_HOME & GRID_HOME, set ownership and 775 permissions.

16

# GRID .bash_profile:

export ORACLE_BASE=/u02/app/gridbase

export ORACLE_HOME=/u02/app/grid/product/19C/dbhome

export ORACLE_SID=+ASM1

source .bash_profile

Grid user env: ORACLE_HOME → Grid home, SID → +ASM1 (ASM instance).

17

# ORACLE .bash_profile:

export ORACLE_BASE=/u01/app/oraclebase/

export ORACLE_HOME=/u01/app/oracle/product/19C/dbhome

export ORACLE_SID=prim1

source .bash_profile

Oracle user env: ORACLE_HOME → DB home, SID → prim1.

18

oracleasm configure -I

# User: grid | Group: oinstall

# Start on boot: y | Scan on boot: y

Configure ASMLib driver owner, group and boot settings.

19

/usr/sbin/oracleasm init

# Mounts /dev/oracleasm filesystem

Initialize and mount Oracle ASMLib driver filesystem.

 

2. ASM DISK CONFIGURATION

 

S.NO

STEPS / COMMANDS

DESCRIPTION

20

SHUT DOWN NODE1 & NODE2

Power off both VMs before adding shared disks.

21

VirtualBox > File > Virtual Media Manager > SHAREABLE

Mark each data disk as Shareable so both nodes can attach it.

22

fdisk -l

# sda:100G sdb:10G sdc:10G sdd:10G

# sde:5G  sdf:5G  sdg:5G

List disks to confirm 6 shared disks are visible.

23

fdisk /dev/sdb → n → p → [Enter]×3 → w

# Repeat for sdc, sdd, sde, sdf, sdg

Create one primary partition on each data disk.

24

oracleasm createdisk DISK1 /dev/sdb1

oracleasm createdisk DISK2 /dev/sdc1

... (DISK3–DISK6)

oracleasm listdisks  # shows DISK1–DISK6

Label each partition as an ASM disk.

25

cd /dev/oracleasm/disks/ && ll

# brw-rw---- 1 grid oinstall DISK1–6

Verify ASM disk ownership under /dev/oracleasm/disks/.

26

POWEROFF NODE1 > ATTACH DISKS TO NODE2 > START NODE2

Attach Node1 shared disks to Node2 in VirtualBox.

27

oracleasm listdisks   # on node2

# If missing: oracleasm scandisks

Verify all 6 ASM disks visible on Node2.

 


Figure: Steps 18–24: ASMLib configure/init, createdisk and listdisks output

3. DNS & SCAN CONFIGURATION

 

S.NO

STEPS / COMMANDS

DESCRIPTION

28

vi /etc/hosts  # on BOTH nodes

# Public: 192.168.56.71/72

# Private: 192.168.10.1/2

# VIP: 192.168.56.81/82

# SCAN: 192.168.56.91/92/93

Configure /etc/hosts with all 4 IP types on both nodes.

29

yum install dnsmasq

chkconfig dnsmasq on

vi /etc/resolv.conf

  nameserver 127.0.0.1

  search homelab.org

  nameserver 8.8.8.8

Install dnsmasq and set nameserver to localhost so SCAN IPs resolve.

30

vi /etc/scanipaddress

192.168.56.91/92/93  node-scan.homelab.org

Document all 3 SCAN IPs.

31

vi /etc/dnsmasq.conf

address=/node-scan.homelab.org/192.168.56.91

address=/node-scan.homelab.org/192.168.56.92

address=/node-scan.homelab.org/192.168.56.93

Configure dnsmasq to resolve SCAN to all 3 IPs.

32

chattr +i /etc/resolv.conf

Lock resolv.conf against accidental DHCP overwrite.

33

service dnsmasq restart

Restart dnsmasq to apply configuration.

34

reboot

Reboot both nodes to apply all changes.

35

nslookup node-scan

# Returns: 192.168.56.91/92/93

Verify SCAN resolution returns all 3 IPs.

 


Figure: Steps 28–35: /etc/hosts configuration and nslookup SCAN verification

4. GRID SOFTWARE & CLUSTER SETUP

 

S.NO

STEPS / COMMANDS

DESCRIPTION

36

ip addr show | grep inet

ip link set enp0s9 up

Verify all 3 network interfaces are UP on both nodes.

37

unzip LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME

Upload and unzip Grid Infrastructure software as grid user.

38

export CV_ASSUME_DISTID=OL8

Bypass OEL7/OL8 compatibility check.

39

vi /etc/ssh/sshd_config

  PermitRootLogin yes

  UseDNS no

Enable root SSH login and disable DNS lookup for SSH.

40

./sshUserSetup.sh -user grid -hosts "node1 node2"

  -noPromptPassphrase -confirm -advance

Set up passwordless SSH for grid user between both nodes.

41

./runcluvfy.sh stage -pre crsinst

  -n node1,node2 -verbose

Run Cluster Verification Utility – must pass all checks.

42

# SSH error workaround:

mv /usr/bin/scp /usr/bin/scp.orig

echo '/usr/bin/scp.orig -T $*' > /usr/bin/scp

chmod 755 /usr/bin/scp

Fix for scp protocol errors during installation.

43

rpm -ivh cvuqdisk-1.0.10-1.rpm  # node1

scp cvuqdisk... root@node2:/tmp

rpm -ivh cvuqdisk...  # node2

Install cvuqdisk on BOTH nodes.

44

systemctl status chronyd

systemctl enable chronyd

systemctl start chronyd

Ensure time sync (chrony/NTP) running on both nodes.

45

export CV_ASSUME_DISTID=OL8

Re-export before launching gridSetup.

46

cd $ORACLE_HOME

./gridSetup.sh

Launch Grid Infrastructure installer GUI.

 



Figure: Steps 40–41: Passwordless SSH setup for grid user and cluvfy pre-check passing

Grid Infrastructure Installer Wizard (./gridSetup.sh)


Figure: gridSetup.sh Step 1: Select 'Configure Oracle Grid Infrastructure for a New Cluster'


Figure: gridSetup.sh Step 2: Select 'Configure an Oracle Standalone Cluster'


Figure: gridSetup.sh Step 3: Cluster Name 'homelab-cluster' and SCAN name 'node-scan.homelab.org'


Figure: gridSetup.sh Step 7: ASM Disk Group 'DATA' – select DISK1, DISK2, DISK3

Running root.sh after Grid Installation


Figure: Step 46 (post): Running orainstRoot.sh and root.sh as root on Node1 – Clusterware stack started

5. ORACLE DATABASE INSTALLATION

 

S.NO

STEPS / COMMANDS

DESCRIPTION

47

unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

Upload Oracle 19c Database software and unzip to ORACLE_HOME.

48

./sshUserSetup.sh -user oracle -hosts "node1 node2"

  -noPromptPassphrase -confirm -advance

Set up passwordless SSH for oracle user between both nodes.

49

./runInstaller

Launch Oracle Database installer GUI. Select RAC, use ASM storage.

50

dbca

Create RAC database using DBCA wizard. Set SID prefix, passwords, character set.

 


Figure: Steps 47–49: Oracle DB software unzip, SSH setup and runInstaller with root.sh


Figure: Step 50: DBCA – Creating Oracle 19c RAC database (prim1/prim2) on ASM storage

TROUBLESHOOTING: SSH CONNECTION ISSUES

 

Recreate id_rsa Key Pair

cd ~/.ssh

ssh-copy-id -i ~/.ssh/id_rsa.pub grid@node1

ssh -i ~/.ssh/id_rsa grid@node1

Fix Permissions

chmod 600 ~/.ssh/id_rsa

chmod 700 ~/.ssh

chmod 600 ~/.ssh/authorized_keys

Backup & Clean Old Keys

cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bak

> ~/.ssh/authorized_keys

Verify & Test SSH

ssh node1 date

ssh node2 date

ssh -o BatchMode=yes grid@node2 echo 'SSH OK'

Copy Fresh Keys from BOTH Nodes (grid user)

On node1:

ssh-copy-id -i ~/.ssh/id_rsa.pub grid@node1

ssh-copy-id -i ~/.ssh/id_rsa.pub grid@node2

On node2:

ssh-copy-id -i ~/.ssh/id_rsa.pub grid@node1

ssh-copy-id -i ~/.ssh/id_rsa.pub grid@node2