How to Download and Install Oracle 19c on Oracle Linux 8.10 (x86_64) in VirtualBox VM

ADVERTISEMENT

Learn how to download and install Oracle 19c on Oracle Linux 8.10 (x86_64) in a VirtualBox VM with this step-by-step guide. This tutorial covers system requirements, installation steps, and key configurations to ensure a smooth setup. Whether you’re a beginner or an experienced DBA, follow along to successfully set up Oracle Database 19c on your virtual machine.

Step 1: Check System Kernel Version

Run the following command to check the system’s kernel version and architecture:

cat /etc/redhat-release 
uname -a

This command displays detailed system information, including the kernel version, system architecture, and hostname. It helps verify that you are running Amazon Linux 2 and confirm compatibility with Oracle 19c.

Step 2: Install Required Packages

Run the following command to install the necessary dependencies for Oracle 19c using root user:

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

--for RHEL8 or CentOS8
curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
dnf -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Oracle 19c requires specific system libraries and tools to function properly. This command installs essential development tools, runtime libraries, and system utilities, ensuring that all dependencies are met before proceeding with the installation. The -y flag automatically confirms the installation, making the process smoother.

Step 3: Crosscheck kernel parameter >>>cat /etc/sysctl.conf

cat /etc/sysctl.conf
sysctl -p

sysctl -a | grep oracle

These kernel parameters are required to ensure stable performance and resource allocation for the Oracle Database.

  • fs.file-max: Sets the maximum number of open file descriptors.
  • kernel.sem: Configures semaphore settings for interprocess communication.
  • kernel.shmmax & kernel.shmall: Define shared memory limits for Oracle processes.
  • net.ipv4.ip_local_port_range: Expands the available port range for network connections.
  • net.core.rmem_* & net.core.wmem_*: Adjust TCP buffer sizes for better network performance.

Step 4: Disable SELinux

Oracle 19c requires SELinux to be set to Permissive mode to avoid security restrictions. Run the following commands to disable SELinux temporarily and permanently:

setenforce 0

This command sets SELinux to Permissive mode temporarily (until the next reboot), allowing Oracle to function without SELinux restrictions.

sed -i 's/^SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config

This command modifies the SELinux configuration file (/etc/selinux/config) to ensure that SELinux remains in Permissive mode even after a system reboot. It replaces SELINUX=enforcing with SELINUX=permissive.

To verify the SELinux status, run:

getenforce

If SELinux is in Permissive mode, the output should be:

Permissive

Step 5: Set Resource Limits for the Oracle User

From root user set the limits for oracle user add below entries in /etc/security/limits.conf file which will define limit.

vi /etc/security/limits.conf

echo "oracle   soft   nofile   1024" >> /etc/security/limits.d/oracle.conf
echo "oracle   hard   nofile   65536" >> /etc/security/limits.d/oracle.conf
echo "oracle   soft   nproc    16384" >> /etc/security/limits.d/oracle.conf
echo "oracle   hard   nproc    16384" >> /etc/security/limits.d/oracle.conf
echo "oracle   soft   stack    10240" >> /etc/security/limits.d/oracle.conf
echo "oracle   hard   stack    32768" >> /etc/security/limits.d/oracle.conf
echo "oracle   hard   memlock  134217728" >> /etc/security/limits.d/oracle.conf
echo "oracle   soft   memlock  134217728" >> /etc/security/limits.d/oracle.conf
  • nofile (Number of open files): Limits the maximum number of open files per process.
  • nproc (Number of processes): Limits the number of user processes allowed.
  • stack (Stack size): Defines the maximum stack size for Oracle processes.
  • memlock (Memory locking): Ensures Oracle can lock memory pages to prevent them from being swapped out.

To check if the limits are correctly applied, switch to the oracle user and run:

ulimit -a

This will display the configured limits, confirming they have been set correctly.

Step 6: Disable Swap

Oracle 19c requires swap to be disabled for optimal performance. Run the following commands as the root user:

swapoff -a

This command disables swap temporarily (until the next reboot). This is necessary because Oracle Real Application Clusters (RAC) and certain Oracle features perform better without swap.

sed -i '/swap/d' /etc/fstab

This command permanently disables swap by removing any swap-related entries from the /etc/fstab file. This ensures that swap does not get re-enabled after a system reboot.

To confirm that swap has been disabled, run:

free -m

The Swap row in the output should show 0 allocated swap space, indicating that swap is successfully disabled.

Step 7: Disable Firewall

Oracle 19c requires certain network ports to be open, and disabling the firewall ensures smooth communication between components. Run the following commands as root to stop and disable the firewall:

systemctl stop firewalld

This command immediately stops the firewall service, preventing it from blocking any required ports during the installation process.

systemctl disable firewalld

This command ensures that the firewall does not start automatically after a system reboot.

To check the firewall status, run:

systemctl status firewalld

If the firewall is disabled, you should see output indicating that the service is inactive (dead).

Step 8: Create Oracle User and Groups

Note: When you create the groups and users below, the system may indicate that they already exist. This happens because the oracle-database-preinstall-19c package automatically creates the necessary Oracle groups and the oracle user during installation. If they already exist, you can ignore the message; otherwise, you can create them manually as shown below.

Oracle requires specific user groups for managing installation, database administration, and operations. Run the following commands as root to create the necessary groups and user:

Create Groups

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
  • oinstall: Primary group for Oracle installation and software management.
  • dba: Grants database administrator privileges.
  • oper: Used for database operator tasks like starting/stopping the database.

Create the Oracle User and Assign Groups

useradd -u 54321 -g oinstall -G dba,oper oracle
  • Creates a user named oracle with UID 54321.
  • Assigns oinstall as the primary group.
  • Adds the user to the dba and oper groups, granting necessary privileges.

To check the newly created user and group associations, run:

id oracle

The output should display the correct UID, primary group (oinstall), and additional groups (dba, oper).

uid=54321(oracle) gid=54321(oinstall) groups=54322(dba),54323(oper)
  • The oracle user has the correct UID (54321).
  • The primary group is oinstall (GID 54321).
  • The user is successfully added to the dba (GID 54322) and oper (GID 54323) groups.

This setup ensures that the Oracle user has the required permissions for installation and database management. ✅

Step 9: Set a Password for the Oracle User

To secure the oracle user account, set a password using the following command:

passwd oracle

This command prompts you to enter a new password for the oracle user. After typing the password, you’ll need to confirm it by re-entering the same password.

To check if the password has been set, try switching to the oracle user:

su - oracle

If the password is correctly set, you should be able to log in as the oracle user without any issues. ✅

Step 10: Create Required Directories and Set Permissions

Oracle 19c requires specific directories for software installation, database storage, and backups. Run the following commands as root to create these directories and set the correct ownership and permissions.

Create Required Directories

mkdir -p /u01/app/oracle/product/19c/db_1
mkdir -p /u02/oracle/oradata
mkdir -p /u02/oracle/FRA
mkdir -p /backup/patch
  • /u01/app/oracle/product/19c/db_1: Directory for Oracle Database binaries.
  • /u02/oracle/oradata: Location for Oracle database data files.
  • /u02/oracle/FRA: Fast Recovery Area (FRA) for backups and logs.
  • /backup/patch: Directory for storing Oracle patches.

Set Ownership for the Oracle User

chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02
chown -R oracle:oinstall /backup
  • Assigns oracle user and oinstall group as the owners of the directories.
  • Ensures the oracle user has proper access to manage Oracle files.

Set Permissions

chmod -R 750 /u01/
chmod -R 750 /u02/
chmod -R 750 /backup/
  • 750 permissions:
    • Owner (oracle): Full read, write, and execute permissions (7).
    • Group (oinstall): Read and execute permissions (5).
    • Others: No access (0).
  • This ensures that only the oracle user and oinstall group have access to these directories, improving security.

To check if the directories are created and permissions are correctly set, run:

ls -ld /u01 /u02 /backup

The output should show the correct ownership (oracle:oinstall) and permissions (drwxr-x—). ✅

Step 11: Configure Oracle Environment Variables

Switch to the Oracle User

Run the following command as root to switch to the oracle user:

su - oracle

Create and Edit .bash_profile

Run the following command to open the .bash_profile file for editing:

vi ~/.bash_profile

Press i to enter insert mode, then add the following environment variables:

export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol8-19.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19c/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export PATH=$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Press ESC, then type: :wq!

This writes the changes and exits the file.

Reload the .bash_profile

To apply the changes immediately, run:

. ~/.bash_profile

or

source ~/.bash_profile

Check if the Oracle environment variables are set correctly:

env | grep ORA

It should display values for ORACLE_HOME, ORACLE_SID, ORACLE_BASE, etc., confirming that the environment is properly configured.

Step 12: Download, Rename, and Unzip Oracle 19c Installation Files

After setting up the Oracle environment, download and extract the Oracle 19c database software from using Oracle user.

Navigate to the Installation Directory

cd $ORACLE_HOME
pwd

Expected Output:

/u01/app/oracle/product/19c/db_1

This confirms you are in the correct installation directory.

Download Oracle 19c Software

wget "https://download.oracle.com/otn/linux/oracle19c/190000/LINUX.X64_193000_db_home.zip?AuthParam=1742637177_923c1652f7bf7081cfef0f5982823030"
  • wget downloads the Oracle 19c ZIP file.
  • -O renames the file directly to LINUX.X64_193000_db_home.zip, avoiding long filenames with AuthParam tokens.

Unzip the Installation File

unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

Extracts the installation files into the $ORACLE_HOME directory.

Verify the Extraction

ls -lrt

You should see the extracted installation files inside $ORACLE_HOME, confirming a successful download and unzip.

Step 14: Install Required X11 Packages for GUI Installation

Oracle 19c requires an X11 (X Window System) environment for running the GUI-based installer. Install the necessary X11 packages based on your OS.

# For Amazon Linux 2
# In this video, we will only install these two as our OS is Amazon Linux 2.
sudo yum install -y xorg-x11-xauth
sudo yum install -y xclock xterm

# For Red Hat Enterprise Linux 8 (RHEL 8)
sudo yum install -y xorg-x11-xauth
sudo yum install -y xterm

# Note: The xorg-x11-apps package (which includes xclock) is in the 
# CodeReady Linux Builder Repository for RHEL 8, so it's skipped.

# For SUSE Linux Enterprise Server 15 SP1
sudo zypper install -y xauth
sudo zypper install -y xclock

# For Ubuntu Server 18
sudo apt install -y x11-apps

Step 15: Export a False Image for Oracle Installation

Oracle’s installer checks the OS version, and sometimes, it may not recognize newer versions. To bypass compatibility issues, set the CV_ASSUME_DISTID environment variable based on your OS.

# Oracle Linux
export CV_ASSUME_DISTID=OL8  # For Oracle Linux 8
export CV_ASSUME_DISTID=OL7  # For Oracle Linux 7

# Red Hat Enterprise Linux (RHEL)
export CV_ASSUME_DISTID=RHEL8  # For RHEL 8
export CV_ASSUME_DISTID=RHEL7  # For RHEL 7

# Amazon Linux
export CV_ASSUME_DISTID=OL8  # Assume compatibility with Oracle Linux 8

# Ubuntu (Debian-based)
export CV_ASSUME_DISTID=OL8  # Mimic Oracle Linux 8

# SUSE Linux Enterprise Server (SLES)
export CV_ASSUME_DISTID=SLES12  # For SLES 12
export CV_ASSUME_DISTID=SLES15  # For SLES 15

# Sun Solaris (SPARC or x86)
export CV_ASSUME_DISTID=SOLARIS

# CentOS (Now Stream)
export CV_ASSUME_DISTID=RHEL8  # Since CentOS is RHEL-based

# Rocky Linux / AlmaLinux
export CV_ASSUME_DISTID=RHEL8

Persist the Setting for Oracle User

To apply the setting permanently for the oracle user:

vi ~/.bash_profile  # Open profile

Add the export command for your OS, then save and exit (:wq!).

. ~/.bash_profile  # Reload profile
echo $CV_ASSUME_DISTID  # Verify setting

Expected Output:

OL8  # or your set value

Step 16: Start Oracle 19c Installer

Now, switch to the oracle user and start the Oracle 19c GUI installer.

Switch to the oracle User

Run the following command from the:

su - oracle

Enter the oracle user password when prompted.

Verify the Current Directory

Ensure you are in the oracle home directory:

pwd
# Expected Output: /home/oracle

Set the Compatibility Variable

Export the CV_ASSUME_DISTID variable to ensure compatibility:

export CV_ASSUME_DISTID=OEL7.6

Start Oracle 19c Installer

cd $ORACLE_HOME
./runInstaller

The Oracle Universal Installer (OUI) GUI will launch. Follow the on-screen steps to complete the installation. ✅

If you want to apply a patch while installing Oracle 19c, use the following command instead of just ./runInstaller:

./runInstaller -applyRU /backup/patch/35943157
  • -applyRU applies the Release Update (RU) patch before installation completes.
  • Replace 35943157 with the correct patch number if using a different patch.

This ensures your Oracle database is installed with the latest updates right from the start!

Complete GUI Instructions (Step-by-Step with Screenshots)

Note: You need to copy and execute these scripts exactly as they are from the root user.

ADVERTISEMENT

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *