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
Table of Contents
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:
- Minimum Hardware Requirements:
- Memory: 8 GB (16 GB recommended)
- Disk Space: At least 30 GB for Oracle Database files
- Processor: 64-bit compatible CPU
- Software Requirements:
- Rocky Linux 9 (64-bit)
yum
package manager- Essential packages like
gcc
,glibc
, and other development tools
- User Permissions:
- Root access for initial setup
- Non-root Oracle user for database management
Step 1: Prepare Rocky Linux 9 System for Oracle Installation
- Update System Packages:
sudo yum update -y
- 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
- 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.
- Edit
sysctl.conf
:
sudo nano /etc/sysctl.conf
- 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
- Apply the New Settings:
sudo sysctl -p
- 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
- Create Required Groups:
sudo groupadd -g 54321 oinstall
sudo groupadd -g 54322 dba
- Create Oracle User and Set Group:
sudo useradd -u 54321 -g oinstall -G dba oracle
- Set Password for Oracle User:
sudo passwd oracle
Step 4: Download Oracle Database 23c Software
- Download Oracle 23c from Oracle’s Official Website:
- Visit Oracle’s Download Center and download the Oracle Database 23c Linux 64-bit installation files.
- Transfer these files to your Linux server, if downloaded on a different machine.
- 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
- 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
- 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
- Switch to the Oracle User:
su - oracle
- Navigate to Installation Directory and Start Installer:
cd /home/oracle/database
./runInstaller
- Follow the Installation Wizard:
- Choose options as prompted to complete the installation process.
- During the installation, configure Oracle Listener and any other required settings.
Step 8: Configure Oracle Listener and Database Services
Once the installation completes, configure Oracle Listener to allow client connections.
- Use
netca
to Configure the Listener:
netca
- Start Oracle Services:
lsnrctl start
Step 9: Post-Installation Configuration
- 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
- Verify Installation:
- Start SQL*Plus:
bash sqlplus / as sysdba
- Check database status.
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
- How can I verify that Oracle 23c is running?
- Use
ps -ef | grep pmon
to check for Oracle background processes.
- How do I configure Oracle to start automatically on reboot?
- Configure the
oracle.service
file and enable it viasystemctl
.
- What should I do if I encounter memory errors during installation?
- Check
limits.conf
and kernel parameters for correct values.
- Can I use Oracle Database 23c for production on Rocky Linux 9?
- Yes, but ensure to follow Oracle’s guidelines for production environments.
- Is Oracle Database 23c compatible with older versions of Linux?
- Compatibility is highest with modern distributions; consult Oracle’s requirements for older systems.