4. Oracle Database 23ai Free RPM Installation on Oracle Linux 9 (OL9)

 

Oracle Database 23ai Free RPM Installation on Oracle Linux 9 (OL9)

Introduction

Oracle Database 23ai Free can be installed on Oracle Linux 9 using a simple RPM package. This article describes the RPM-based installation of Oracle Database 23ai Free 64-bit on Oracle Linux 9 (OL9) 64-bit.

The installation is based on a server configuration with:

  • A minimum of 2 GB swap space

  • Secure Linux (SELinux) set to permissive

Note: This is one of the simplest ways to install Oracle Database, as the RPM handles most of the configuration automatically. It is ideal for developers, students, and anyone who wants to quickly set up an Oracle Database environment for learning or development.


Overview of the Installation Process

#PhaseDescription
1Hosts FileConfigure the server's hostname
2Oracle InstallationInstall the preinstall package and the 23ai RPM
3Create DatabaseRun the configuration script to create the demo database
4Using ItConnect to the database and manage the service

Phase 1: Configure the Hosts File

The /etc/hosts file must contain a fully qualified name for the server.

Format:

text
<IP-address>  <fully-qualified-machine-name>  <machine-name>

Example:

text
127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.56.107  ol9-23.localdomain  ol9-23

Set the hostname in /etc/hostname:

text
ol9-23.localdomain

Important: The hostname must be resolvable both forward and backward. Verify with hostname and ping ol9-23.localdomain.


Phase 2: Oracle Installation

Step 1: Download the RPM

Download the relevant RPM from the Oracle download page:

text
oracle-database-free-23ai-1.0-1.el9.x86_64.rpm

Note: The RPM is available for free from Oracle. No support contract is required.

Step 2: Install the Oracle Prerequisites

As the root user, install the preinstall package:

bash
dnf install -y oracle-database-preinstall-23ai

Purpose: The preinstall package automatically configures all the required kernel parameters, user limits, and creates the oracle user and groups. This saves you from having to perform the manual setup steps required in other installation methods.

Step 3: Install the Oracle 23ai Software

As the root user, install the 23ai software using the following command. This assumes the RPM file is in the /tmp directory:

bash
dnf -y localinstall /tmp/oracle-database-free-23ai-1.0-1.el9.x86_64.rpm

Result: The software is installed to the following ORACLE_HOME:

text
/opt/oracle/product/23ai/dbhomeFree

Phase 3: Create Database

In addition to the software installation, the RPM creates a script that allows you to create a demo database called FREE, with a pluggable database (PDB) called FREEPDB1.

Step 1: Set the DB_PASSWORD Environment Variable

bash
export DB_PASSWORD=SysPassword1

Note: Replace SysPassword1 with a secure password of your choice. Oracle recommends that the password be at least 8 characters long, containing at least 1 uppercase character, 1 lowercase character, and 1 digit.

Step 2: Run the Configuration Script

bash
(echo "${DB_PASSWORD}"; echo "${DB_PASSWORD}";) | /etc/init.d/oracle-free-23ai configure

Step 3: Review the Output

The configuration script performs the following steps:

text
Specify a password to be used for database accounts...
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password:
Enter SYSTEM user password:
Enter PDBADMIN User Password:
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
...
100% complete
Database creation complete.

Step 4: Note the Database Information

After completion, the script displays the following information:

AttributeValue
Global Database NameFREE
System Identifier (SID)FREE
Pluggable DatabaseFREEPDB1
PDB Connect Stringlocalhost.localdomain/FREEPDB1
CDB Connect Stringlocalhost.localdomain

Log Files: For further details, check the log files at:

text
/opt/oracle/cfgtoollogs/dbca/FREE/

Alternative: You can also create a database in the normal way using the Database Configuration Assistant (DBCA). The configuration script is optional.


Phase 4: Using It

Step 1: Connect as the Oracle User

From the oracle user, set the environment and connect:

bash
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
export PATH=$ORACLE_HOME/bin:$PATH

Step 2: Connect to the Root Container (CDB)

bash
sqlplus sys/SysPassword1@//localhost:1521/free as sysdba

Step 3: Connect to the Pluggable Database (PDB)

bash
sqlplus sys/SysPassword1@//localhost:1521/freepdb1 as sysdba

Step 4: Manage the Service

You can stop and start the database service from the root user with the following commands:

bash
# Stop the database
/etc/init.d/oracle-free-23ai stop

# Start the database
/etc/init.d/oracle-free-23ai start

The Complete Installation Flow

text
┌─────────────────────────────────────────────────────────────────┐
│  1. HOSTS FILE                                                  │
│     Configure /etc/hosts and /etc/hostname                      │
└──────────────────────────┬──────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│  2. ORACLE INSTALLATION                                         │
│     dnf install -y oracle-database-preinstall-23ai              │
│     dnf -y localinstall /tmp/oracle-database-free-23ai-*.rpm    │
└──────────────────────────┬──────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│  3. CREATE DATABASE                                             │
│     export DB_PASSWORD=SysPassword1                             │
│     /etc/init.d/oracle-free-23ai configure                      │
└──────────────────────────┬──────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│  4. USING IT                                                    │
│     Connect to CDB: sqlplus sys/password@//localhost:1521/free  │
│     Connect to PDB: sqlplus sys/password@//localhost:1521/freepdb1│
│     Manage service: /etc/init.d/oracle-free-23ai start|stop     │
└─────────────────────────────────────────────────────────────────┘

Key Paths and Configuration

ItemPath / Value
ORACLE_HOME/opt/oracle/product/23ai/dbhomeFree
Global Database NameFREE
SIDFREE
PDB NameFREEPDB1
Listener Port1521
CDB Connect Stringlocalhost:1521/free
PDB Connect Stringlocalhost:1521/freepdb1
Service Script/etc/init.d/oracle-free-23ai
Log Directory/opt/oracle/cfgtoollogs/dbca/FREE/

Advantages of RPM Installation

AdvantageDescription
SimplicitySingle command to install the software
Automated PrerequisitesPreinstall package handles kernel parameters and user setup
Fast SetupDatabase can be created in minutes
Standard PathsUses standard Oracle paths for easy management
Service IntegrationIncludes init.d scripts for service management
Free to UseNo support contract required

Best Practices

PracticeDescription
Use Secure PasswordsSet strong passwords for SYS, SYSTEM, and PDBADMIN
Configure the FirewallAllow port 1521 for database connections
Set SELinux to PermissiveRequired for smooth installation
Monitor Log FilesReview logs in /opt/oracle/cfgtoollogs/dbca/FREE/
Back Up the DatabasePerform regular backups once the database is in use
Use the Service ScriptUse /etc/init.d/oracle-free-23ai for start/stop
Document ConfigurationKeep a record of passwords and connection strings

Troubleshooting Common Issues

IssuePossible CauseSolution
RPM installation failsMissing dependenciesRun dnf install -y oracle-database-preinstall-23ai first
Database creation failsPassword too weakUse a password with at least 8 characters, 1 uppercase, 1 lowercase, 1 digit
Listener not startingPort 1521 in useCheck for conflicting services on port 1521
Cannot connectWrong connect stringVerify the service name (free or freepdb1)
Service won't startWrong permissionsRun the service script as root
SELinux blocks installationSELinux enforcingSet SELinux to permissive and reboot
Firewall blocks connectionsFirewall enabledConfigure or disable the firewall

Summary

Installing Oracle Database 23ai Free on Oracle Linux 9 using the RPM involves the following key steps:

  1. Configure the Hosts File: Set the fully qualified hostname

  2. Install the Preinstall Package: dnf install -y oracle-database-preinstall-23ai

  3. Install the 23ai RPM: dnf -y localinstall /tmp/oracle-database-free-23ai-*.rpm

  4. Create the Database: Run /etc/init.d/oracle-free-23ai configure

  5. Connect and Use: Connect to the CDB or PDB using SQL*Plus

  6. Manage the Service: Use /etc/init.d/oracle-free-23ai start|stop

Key Points to Remember

  • The RPM installation is the simplest way to install Oracle Database

  • The preinstall package handles all kernel parameters and user setup automatically

  • The configuration script creates a demo database called FREE with a PDB called FREEPDB1

  • The ORACLE_HOME is /opt/oracle/product/23ai/dbhomeFree

  • The listener port is 1521

  • The service script provides start/stop functionality

  • No support contract is required — it's free to use

Why This Matters

The RPM installation of Oracle Database 23ai Free is significant because it:

  • Lowers the Barrier to Entry: Makes it easy for anyone to install and use Oracle Database

  • Saves Time: Eliminates the need for manual prerequisite setup

  • Provides a Standard Environment: Uses consistent paths and configuration

  • Supports Learning: Ideal for students, developers, and anyone exploring Oracle Database

  • Enables Rapid Prototyping: Allows developers to quickly set up a database for testing

  • Integrates with Linux Services: Provides standard service management

By following this guide, you can quickly and easily install Oracle Database 23ai Free on Oracle Linux 9, providing a fully functional Oracle Database environment for development, testing, or learning.


References

  • Oracle Database Documentation: Oracle Database Free Installation Guide

  • Oracle Database Documentation: Oracle Database 23ai New Features

  • Oracle Linux Documentation: Oracle Linux 9 Administrator's Guide

  • Oracle Download Page: Oracle Database 23ai Free RPM

  • Related Articles: Oracle Universal Installations (OUI) Silent Installations, Database Configuration Assistant (DBCA): Creating Databases in Silent Mode

No comments:

Post a Comment