Admin

Oracle Peoplesoft

Oracle RAC 19c Two-Node Cluster Setup on OEL 8 with Grid Infrastructure 19c

Install & configure Oracle RAC 19c two-node cluster on OEL 8 with Grid Infrastructure 19c. A comprehensive setup guide for high availability.

By Someshwar ThakurPublished: July 8, 202613 min read13 views✓ Fact Checked
Oracle RAC 19c Two-Node Cluster Setup on OEL 8 with Grid Infrastructure 19c
Oracle RAC 19c Two-Node Cluster Setup on OEL 8 with Grid Infrastructure 19c

Overview: Mastering High Availability with Oracle RAC 19c on OEL 8

In the relentless pursuit of uninterrupted service and scalable database operations, Oracle Real Application Clusters (RAC) stands as a cornerstone technology for enterprises worldwide. As a senior technology writer at TechNews Venture, I've witnessed firsthand the transformative power of RAC in ensuring high availability, disaster recovery, and workload management for mission-critical applications. With the advent of Oracle Database 19c, the Long Term Support (LTS) release, coupled with Oracle Linux 8 (OEL 8), we have a robust, secure, and highly performant platform for our most demanding data infrastructure.

This article delves deep into the practicalities of setting up a two-node Oracle RAC 19c cluster. Oracle RAC allows multiple instances to access a single database, providing fault tolerance at the instance level and enabling horizontal scaling. If one instance fails, the other instances continue to provide service, seamlessly redirecting client connections. This setup leverages Oracle Grid Infrastructure 19c, which includes Oracle Clusterware and Automatic Storage Management (ASM), to manage the cluster resources and shared storage efficiently. OEL 8, with its enhanced security features, improved performance, and modern package management, provides an ideal operating system foundation for this critical deployment.

Our objective is to provide a detailed, step-by-step guide, complete with real-world commands and configurations, to empower DBAs and system administrators to confidently deploy this powerful solution. From initial operating system preparation to the final database creation, we'll navigate the intricacies, ensuring a stable and optimized RAC environment.

Prerequisites: Laying the Foundation for a Robust RAC Cluster

A successful Oracle RAC deployment hinges on meticulous preparation. Overlooking any detail in the prerequisites phase can lead to significant headaches down the line. Here, we outline the essential hardware, software, network, and storage requirements for our two-node cluster.

Hardware Requirements (Per Node)

  • CPU: Minimum 2 vCPUs (4 recommended for production).
  • RAM: Minimum 8 GB (16 GB recommended for GI + DB).
  • Disk Space:
    • OS: 50 GB for root (/) and /boot.
    • Oracle Grid Infrastructure Home: 15 GB for /u01/app/19.0.0/grid.
    • Oracle Database Home: 15 GB for /u01/app/oracle/product/19.0.0/dbhome_1.
    • Temporary Space: 2 GB for /tmp.
    • Swap Space: 16 GB (if RAM is 8-16 GB), or 8 GB (if RAM > 16 GB).
  • Network Interfaces: Minimum 2 physical NICs (3 recommended for best practice - Public, Private, and VIP/SCAN).

Software Requirements

  • Operating System: Oracle Linux 8 (OEL 8.x).
  • Oracle Grid Infrastructure: Oracle Grid Infrastructure 19c (19.x.x.x).
  • Oracle Database: Oracle Database 19c (19.x.x.x).
  • Required OS Packages: The oracle-database-preinstall-19c RPM simplifies most OS-level prerequisites.

Network Configuration

Each node requires multiple IP addresses and careful configuration. We will use the following scheme:

  • Node 1 Hostname: racnode1.localdomain
  • Node 2 Hostname: racnode2.localdomain
  • Public Network (example: 192.168.1.0/24)
    • racnode1-public: 192.168.1.101
    • racnode2-public: 192.168.1.102
    • Virtual IPs (VIPs): racnode1-vip (192.168.1.103), racnode2-vip (192.168.1.104)
    • Single Client Access Name (SCAN) IP: rac-scan (192.168.1.105, 192.168.1.106, 192.168.1.107) - 3 IPs are standard for SCAN.
  • Private Interconnect Network (example: 10.0.0.0/24)
    • racnode1-private: 10.0.0.101
    • racnode2-private: 10.0.0.102

Shared Storage

Oracle RAC requires shared storage for the Grid Infrastructure (OCR and Voting Disks) and the actual database files. We will simulate shared block storage using virtual disks and manage them with Oracle ASM. For a two-node cluster, we need a minimum of 3 voting disks and 1 OCR disk. Oracle automatically mirrors these components, so we'll prepare enough disk groups to accommodate this. A common practice is to have separate disk groups for 'DATA', 'FRA' (Fast Recovery Area), and 'REDO' (for redo logs, often combined with DATA). For simplicity, we'll aim for three shared disks for ASM: one for GI (OCR/Voting), one for DATA, and one for FRA.

  • Disk 1: 5 GB for GRID (OCR and Voting Disks)
  • Disk 2: 50 GB for DATA (Database Files)
  • Disk 3: 20 GB for FRA (Fast Recovery Area)

These disks must be presented to both RAC nodes with identical device paths (e.g., /dev/sdb, /dev/sdc, /dev/sdd).

Users and Groups

Oracle recommends separate OS users for Grid Infrastructure and Oracle Database software ownership. We'll create the following:

  • Groups: oinstall (primary inventory group), asmadmin, asmdba, asmoper, dba, oper, backupdba, dgdba, kmdba.
  • Users: grid (for Grid Infrastructure), oracle (for Oracle Database).
Important Note: Ensure that all prerequisites are met consistently across both nodes. Inconsistencies are a primary source of installation failures in RAC environments.

Step-by-Step Implementation: Building the RAC Cluster

1. Operating System Installation and Configuration (On both racnode1 and racnode2)

Install Oracle Linux 8.x on both nodes. Choose a minimal installation and then add necessary packages.

1.1. Hostname and Network Configuration

Configure hostnames and network interfaces. We'll use NetworkManager for simplicity.


# On racnode1
hostnamectl set-hostname racnode1.localdomain
nmcli connection add type ethernet con-name "Public" ifname enp0s8 ip4 192.168.1.101/24 gw4 192.168.1.1
nmcli connection modify "Public" autoconnect yes
nmcli connection add type ethernet con-name "Private" ifname enp0s9 ip4 10.0.0.101/24
nmcli connection modify "Private" autoconnect yes
nmcli connection up "Public"
nmcli connection up "Private"

# On racnode2
hostnamectl set-hostname racnode2.localdomain
nmcli connection add type ethernet con-name "Public" ifname enp0s8 ip4 192.168.1.102/24 gw4 192.168.1.1
nmcli connection modify "Public" autoconnect yes
nmcli connection add type ethernet con-name "Private" ifname enp0s9 ip4 10.0.0.102/24
nmcli connection modify "Private" autoconnect yes
nmcli connection up "Public"
nmcli connection up "Private"

Update /etc/hosts on both nodes to include all public, private, and SCAN IPs. This is crucial for name resolution.


# /etc/hosts (on both racnode1 and racnode2)
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

# Public IPs
192.168.1.101   racnode1.localdomain    racnode1
192.168.1.102   racnode2.localdomain    racnode2

# Private Interconnect IPs
10.0.0.101      racnode1-priv
10.0.0.102      racnode2-priv

# Virtual IPs (configured by GI installer)
192.168.1.103   racnode1-vip.localdomain    racnode1-vip
192.168.1.104   racnode2-vip.localdomain    racnode2-vip

# SCAN IPs (configured by GI installer)
192.168.1.105   rac-scan.localdomain    rac-scan
192.168.1.106   rac-scan.localdomain    rac-scan
192.168.1.107   rac-scan.localdomain    rac-scan

Disable firewalld and SELinux for easier installation. Re-enable and configure after installation if required by security policies.


# On both racnode1 and racnode2
systemctl disable --now firewalld
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config

1.2. Install Required Packages and Kernel Parameters

The oracle-database-preinstall-19c package handles most kernel parameters, user/group creation, and package dependencies. Ensure your OS is updated.


# On both racnode1 and racnode2
dnf update -y
dnf install -y oracle-database-preinstall-19c bind-utils vim unzip

Verify kernel parameters. The preinstall package sets them, but a manual check is good.


# On both racnode1 and racnode2
sysctl -p
# Check key parameters, e.g.:
# sysctl -a | grep shmmax
# sysctl -a | grep file-max

1.3. Create Oracle Directories and Set Permissions

The preinstall RPM creates the oracle user and oinstall, dba, oper groups. We need to create the grid user and ASM-specific groups.


# On both racnode1 and racnode2
groupadd -g 5000 oinstall # (if not created by preinstall rpm)
groupadd -g 5001 dba
groupadd -g 5002 oper
groupadd -g 5003 backupdba
groupadd -g 5004 dgdba
groupadd -g 5005 kmdba
groupadd -g 5006 asmadmin
groupadd -g 5007 asmdba
groupadd -g 5008 asmoper

useradd -u 5000 -g oinstall -G asmadmin,asmdba,asmoper,backupdba,dgdba,kmdba grid
useradd -u 5001 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba oracle

echo "oracle" | passwd --stdin oracle
echo "grid" | passwd --stdin grid

# Create base directories
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01/app/grid
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/

1.4. Configure SSH Equivalency

The Grid Infrastructure installer requires passwordless SSH connectivity between all nodes for both grid and oracle users.


# On racnode1, as user grid
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
ssh-copy-id grid@racnode1
ssh-copy-id grid@racnode2

# On racnode1, as user oracle
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
ssh-copy-id oracle@racnode1
ssh-copy-id oracle@racnode2

# Verify from racnode1 as grid user:
ssh racnode2 date
# Verify from racnode1 as oracle user:
ssh racnode2 date

Repeat the ssh-keygen and ssh-copy-id process on racnode2 for both users, ensuring mutual trust. For instance, from `racnode2` as `grid` user, `ssh-copy-id grid@racnode1`.

2. Shared Storage Configuration (On both racnode1 and racnode2)

We'll use UDEV rules to ensure consistent permissions and ownership for our shared ASM disks. Assume the shared disks are /dev/sdb, /dev/sdc, /dev/sdd.


# On both racnode1 and racnode2, as root
# Partition the disks (e.g., /dev/sdb, /dev/sdc, /dev/sdd) if not already done.
# For simplicity, we'll assume they are raw disks. If they contain partitions (e.g., sdb1), use those.
# Example using fdisk for /dev/sdb (repeat for sdc, sdd):
# fdisk /dev/sdb
#   n (new partition)
#   p (primary)
#   1 (partition number)
#   [Enter] (default first sector)
#   [Enter] (default last sector, use entire disk)
#   w (write changes)

# Create UDEV rules file
vi /etc/udev/rules.d/99-oracle-asm.rules

# Add the following content to 99-oracle-asm.rules:
# KERNEL=="sd[b-d]1", ENV{DEVTYPE}=="partition", OWNER="grid", GROUP="asmadmin", MODE="0660"
# (Adjust KERNEL pattern if your disks are named differently or you're using raw disks directly, e.g., KERNEL=="sd[b-d]")
# For raw disks without partitions:
# KERNEL=="sdb", OWNER="grid", GROUP="asmadmin", MODE="0660"
# KERNEL=="sdc", OWNER="grid", GROUP="asmadmin", MODE="0660"
# KERNEL=="sdd", OWNER="grid", GROUP="asmadmin", MODE="0660"

# Apply UDEV rules
udevadm control --reload-rules
udevadm trigger

# Verify permissions (example for /dev/sdb, adjust for sdc, sdd)
ls -l /dev/sdb
# Expected output: brw-rw----. 1 grid asmadmin ... /dev/sdb

3. Install Oracle Grid Infrastructure 19c (From racnode1 as grid user)

Mount the Grid Infrastructure ISO/ZIP file and run the installer.


# On racnode1, as root
mkdir -p /mnt/grid_media
mount -o loop /path/to/V998634-01.zip /mnt/grid_media # Replace with actual path to GI ISO/ZIP

# On racnode1, as grid user
cd /mnt/grid_media/grid
./gridSetup.sh

The Oracle Universal Installer (OUI) will launch. Follow these steps in the GUI:

  1. Select Configuration Option: "Configure and Install Grid Infrastructure for a Cluster".
  2. Select Cluster Type: "Oracle Real Application Clusters (RAC) database".
  3. Select Grid Infrastructure Management Repository: "Create a new Grid Infrastructure Management Repository".
  4. Cluster Node Information: Click "Add" and enter the public hostnames of both nodes (racnode1, racnode2). The installer will perform SSH connectivity checks.
  5. Specify Network Interface Usage:
    • enp0s8 (or your public NIC) -> Public
    • enp0s9 (or your private NIC) -> Private
  6. Storage Option: "Automatic Storage Management (ASM)".
  7. Create ASM Disk Group:
    • Disk Group Name: +GRID
    • Redundancy: "External" (for our simulated setup, but "Normal" for production with 3+ disks).
    • Disk Discovery Path: /dev/sd* (or specific paths like /dev/sdb)
    • Select /dev/sdb (or the corresponding disk for GRID).
    • Allocate size: 5 GB.
  8. Specify ASM Password: Provide a strong password.
  9. Privileged Operating System Groups: Pre-filled by preinstall RPM. Verify:
    • ASM Administrator: asmadmin
    • ASM DBA: asmdba
    • ASM OPERATOR: asmoper
  10. Installation Location:
    • Oracle Base: /u01/app/grid
    • Software Location: /u01/app/19.0.0/grid
  11. Root Script Execution: Select "Automatically run configuration scripts". Provide root password.
  12. Prerequisite Checks: Resolve any reported issues.
  13. Summary: Review settings and click "Install".

The installer will copy files, configure Clusterware, and create the ASM instance. Monitor the progress. Once complete, verify the cluster status.


# On racnode1, as grid user
. /u01/app/grid/product/19.0.0/grid/bin/oraenv # Set GI environment
crsctl stat res -t
# Expected output should show all resources online, including ora.asm, ora.cluster_vips, ora.scan_listeners, etc.

4. Install Oracle Database 19c (From racnode1 as oracle user)

Mount the Database ISO/ZIP file and run the installer.


# On racnode1, as root
mkdir -p /mnt/db_media
mount -o loop /path/to/V998642-01.zip /mnt/db_media # Replace with actual path to DB ISO/ZIP

# On racnode1, as oracle user
cd /mnt/db_media/database
./runInstaller

Follow these steps in the GUI:

  1. Select Configuration Option: "Set Up Software Only" (we'll create the database later).
  2. Select Database Installation Option: "Oracle Real Application Clusters database installation".
  3. Select RAC Database Installation: "Oracle Real Application Clusters database installation".
  4. Select Nodes: Ensure both racnode1 and racnode2 are selected.
  5. Database Edition: "Enterprise Edition".
  6. Installation Location:
    • Oracle Base: /u01/app/oracle
    • Software Location: /u01/app/oracle/product/19.0.0/dbhome_1
  7. Privileged Operating System Groups: Pre-filled. Verify:
    • Database Administrator: dba
    • Database Backup and Recovery: backupdba
    • Data Guard: dgdba
    • Key Management: kmdba
    • Real Application Clusters: asmdba
  8. Root Script Execution: Select "Automatically run configuration scripts". Provide root password.
  9. Prerequisite Checks: Resolve any reported issues.
  10. Summary: Review settings and click "Install".

After the software installation, run root.sh on both nodes if not automated.

5. Create Oracle RAC Database (From racnode1 as oracle user)

Use the Database Configuration Assistant (DBCA) to create your RAC database.


# On racnode1, as oracle user
. /u01/app/oracle/product/19.0.0/dbhome_1/bin/oraenv # Set DB environment
dbca

Follow these steps in the DBCA GUI:

  1. Database Operation: "Create Database".
  2. Creation Mode: "Advanced Configuration".
  3. Database Type: "Oracle Real Application Cluster (RAC) database".
  4. Configuration Type: "Admin-Managed database".
  5. Database Template: "General Purpose or Transaction Processing".
  6. Global Database Name: RACDB.localdomain
  7. SID Prefix: RACDB (Instances will be RACDB1, RACDB2).
  8. Container Database: Check "Create as Container database".
    • PDB Name: PDB1
  9. ASM Disk Groups:
    • Select +DATA (for database files).
    • Select +FRA (for fast recovery area).
    • If you only have +GRID, you can select that, but it's not recommended for production.

    If you haven't created +DATA and +FRA disk groups, you'll need to do so via asmca first:

    
            # On racnode1, as grid user
            . /u01/app/grid/product/19.0.0/grid/bin/oraenv
            asmca # Launch ASM Configuration Assistant
            # Create +DATA disk group using /dev/sdc (External Redundancy)
            # Create +FRA disk group using /dev/sdd (External Redundancy)
            
  10. Specify Fast Recovery Area: Enable and specify +FRA as the disk group.
  11. Specify Archive Log Mode: Enable Archiving.
  12. Listener Configuration: Use existing listener (created by GI).
  13. Database Vault, Label Security, olap, etc.: Enable as needed.
  14. Initialization Parameters: Adjust SGA/PGA, character sets as required.
  15. Management Options: Register with EM Express.
  16. Database Credentials: Set passwords for SYS, SYSTEM, PDBADMIN.
  17. Creation Options: "Create Database".
  18. Summary: Review and click "Finish".

DBCA will create the database, start the instances, and register them with Clusterware.

6. Post-Installation Verification

Verify the cluster and database status.


# On racnode1, as grid user
. /u01/app/grid/product/19.0.0/grid/bin/oraenv
crsctl stat res -t

# On racnode1, as oracle user
. /u01/app/oracle/product/19.0.0/dbhome_1/bin/oraenv
srvctl status database -d RACDB
srvctl status instance -d RACDB -i RACDB1
srvctl status instance -d RACDB -i RACDB2

# Connect to the database
sqlplus sys/oracle@RACDB as sysdba
SQL> show pdbs;
SQL> select instance_name, host_name, status from gv$instance;

Security Considerations: Fortifying Your Oracle RAC Environment

A highly available system is only as good as its security posture. For an Oracle RAC 19c cluster on OEL 8, security must be a multi-layered approach.

  • Operating System Hardening:
    • SELinux/AppArmor: While often disabled during installation for simplicity, re-enable SELinux in permissive mode and then enforcing, carefully configuring policies to allow Oracle processes.
    • Firewall (firewalld): Re-enable and configure firewalld to allow only necessary ports (e.g., 1521 for client connections, 22 for SSH, private interconnect ports).
    • Principle of Least Privilege: Ensure grid and oracle users have only the necessary permissions. Do not run database processes as root.
    • SSH Security: Disable password authentication for SSH and rely solely on key-based authentication. Regularly rotate SSH keys.
    • Audit Logging: Configure robust audit logging on OEL 8 (e.g., using auditd) to track access and changes to critical files and directories.
  • Network Security:
    • Separate Networks: Strictly isolate the private interconnect network. It should not be routable from outside the cluster.
    • VLANs: Implement VLANs for public, private, and storage networks to segment traffic and prevent unauthorized access.
    • Oracle Net Services Encryption/Checksumming: Configure sqlnet.ora to enforce encryption and data integrity checksumming for all client-server communication.
  • Oracle Database Security:
    • Strong Passwords: Enforce strong password policies for all database users (SYS, SYSTEM, PDBADMIN, etc.) and regularly rotate them.
    • Database Auditing: Configure comprehensive database auditing to track sensitive operations and user activity.
    • Privilege Analysis: Use Oracle Database's built-in tools (e.g., Data Dictionary Views) to regularly review and revoke unnecessary user privileges.
    • Database Vault: Consider implementing Oracle Database Vault for an extra layer of security, especially for sensitive data, by preventing privileged users from accessing application data.
    • Patching: Regularly apply Oracle Critical Patch Updates (CPUs) and Security Patch Updates (SPUs) to both Grid Infrastructure and Database homes.

Best Practices: Optimizing Your RAC 19c Environment

Beyond a successful installation, adhering to best practices ensures optimal performance, reliability, and manageability of your Oracle RAC 19c cluster.

  • Regular Patching: Stay current with Oracle's recommended patches, including Release Updates (RUs) and Critical Patch Updates (
📧

Enjoyed this article?

Get articles like this delivered to your inbox daily. Join 10,000+ tech professionals.

Written By

Someshwar Thakur

PS Admin, Cloud Architect, DBA

Sources & References

• Official company announcements and press releases

• Industry reports from Gartner, IDC, and Statista

• Peer-reviewed research and technical documentation

• On-record statements from industry experts

Last verified: July 8, 2026

Fact-checked by TechNews Venture editorial team

Leave a Comment

Comments are moderated and will appear after review.