Site icon CentLinux

Install Oracle Database 23c on Rocky Linux 9

Share on Social Media

Learn how to install Oracle Database 23c on Rocky Linux 9 with this comprehensive guide. Set up and configure Oracle Database for your development or production needs. #centlinux #linux #oracle

Introduction

Oracle Database 23c introduces new features and enhancements aimed at delivering powerful performance and scalability for a wide range of applications. For enterprises and developers, running Oracle Database 23c on Rocky Linux 9 provides a robust and open-source operating system with enterprise-level capabilities, making it an ideal environment for Oracle’s latest database offering.

This guide walks through each step needed to install Oracle Database 23c on Rocky Linux 9, covering prerequisites, configurations, and essential setup tasks to ensure a smooth installation.

Read Also: How to install Oracle 21c on Rocky Linux 8


Prerequisites for Installing Oracle Database 23c on Rocky Linux 9

Before beginning, ensure your Rocky Linux 9 server meets the following requirements:


Step 1: Prepare Rocky Linux 9 System for Oracle Installation

  1. Update System Packages:
   sudo yum update -y
  1. Install Required Tools and Dependencies:
   sudo yum install -y gcc make binutils glibc glibc-devel ksh libaio libaio-devel libX11 libX11-devel libXi libXtst libXtst-devel
  1. Set Hostname and Check System Compatibility:
    Set a static hostname for your system:
   sudo hostnamectl set-hostname oracle-server

Step 2: Configure Kernel Parameters and System Limits

Oracle Database requires specific kernel parameters and system limits for optimal performance. Configure these by editing the sysctl.conf file.

  1. Edit sysctl.conf:
   sudo nano /etc/sysctl.conf
  1. Add the Following Kernel Parameters:
   fs.aio-max-nr = 1048576
   fs.file-max = 6815744
   kernel.shmall = 2097152
   kernel.shmmax = 4294967295
   kernel.shmmni = 4096
   kernel.sem = 250 32000 100 128
   net.ipv4.ip_local_port_range = 9000 65500
   net.core.rmem_default = 262144
   net.core.rmem_max = 4194304
   net.core.wmem_default = 262144
   net.core.wmem_max = 1048576
  1. Apply the New Settings:
   sudo sysctl -p
  1. Configure User Limits:
    Edit the limits file to define resource limits for the Oracle user:
   sudo nano /etc/security/limits.conf

Add the following lines:

   oracle   soft   nproc    2047
   oracle   hard   nproc    16384
   oracle   soft   nofile   1024
   oracle   hard   nofile   65536
   oracle   soft   stack    10240
   oracle   hard   stack    32768

Step 3: Create Oracle User and Groups

  1. Create Required Groups:
   sudo groupadd -g 54321 oinstall
   sudo groupadd -g 54322 dba
  1. Create Oracle User and Set Group:
   sudo useradd -u 54321 -g oinstall -G dba oracle
  1. Set Password for Oracle User:
   sudo passwd oracle

Step 4: Download Oracle Database 23c Software

  1. Download Oracle 23c from Oracle’s Official Website:
  1. Extract the Oracle Installer:
    Place the installer in a directory like /home/oracle and extract it:
   sudo mkdir -p /home/oracle/database
   sudo tar -xzvf oracle-database-23c.tar.gz -C /home/oracle/database

Step 5: Install Oracle Preinstallation RPM Package

  1. Install the Preinstallation RPM:
    Oracle provides a preinstallation RPM that configures system settings for Oracle.
   sudo yum install -y oracle-database-preinstall-23c

This RPM automates several kernel and user configurations, making the setup smoother.


Step 6: Configure Directory Structure for Oracle Installation

  1. Create Oracle Base and Data Directories:
   sudo mkdir -p /u01/app/oracle/product/23c/dbhome_1
   sudo chown -R oracle:oinstall /u01
   sudo chmod -R 775 /u01

Step 7: Run the Oracle Database Installer

  1. Switch to the Oracle User:
   su - oracle
  1. Navigate to Installation Directory and Start Installer:
   cd /home/oracle/database
   ./runInstaller
  1. Follow the Installation Wizard:

Step 8: Configure Oracle Listener and Database Services

Once the installation completes, configure Oracle Listener to allow client connections.

  1. Use netca to Configure the Listener:
   netca
  1. Start Oracle Services:
   lsnrctl start

Step 9: Post-Installation Configuration

  1. Set Environment Variables for Oracle User:
   echo "export ORACLE_BASE=/u01/app/oracle" >> ~/.bash_profile
   echo "export ORACLE_HOME=\$ORACLE_BASE/product/23c/dbhome_1" >> ~/.bash_profile
   echo "export PATH=\$PATH:\$ORACLE_HOME/bin" >> ~/.bash_profile
   source ~/.bash_profile
  1. Verify Installation:

Recommended Online Training: Become an Oracle Database Administrator (DBA)


Step 10: Enable Oracle Services on Boot

To ensure Oracle starts with your system:

sudo systemctl enable oracle.service

Conclusion

Installing Oracle Database 23c on Rocky Linux 9 is a detailed process, but following these steps ensures a reliable and powerful setup for database needs. After installation, consider reviewing Oracle’s documentation for performance tuning.

If you are Looking for a reliable Linux system admin? I offer expert management, optimization, and support for all your Linux server needs, ensuring smooth and secure operations. Have a look at my Fiverr Profile.


FAQs

  1. How can I verify that Oracle 23c is running?
  1. How do I configure Oracle to start automatically on reboot?
  1. What should I do if I encounter memory errors during installation?
  1. Can I use Oracle Database 23c for production on Rocky Linux 9?
  1. Is Oracle Database 23c compatible with older versions of Linux?

Exit mobile version