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
| # | Phase | Description |
|---|---|---|
| 1 | Hosts File | Configure the server's hostname |
| 2 | Oracle Installation | Install the preinstall package and the 23ai RPM |
| 3 | Create Database | Run the configuration script to create the demo database |
| 4 | Using It | Connect 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:
<IP-address> <fully-qualified-machine-name> <machine-name>Example:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.56.107 ol9-23.localdomain ol9-23Set the hostname in /etc/hostname:
ol9-23.localdomainImportant: The hostname must be resolvable both forward and backward. Verify with
hostnameandping ol9-23.localdomain.
Phase 2: Oracle Installation
Step 1: Download the RPM
Download the relevant RPM from the Oracle download page:
oracle-database-free-23ai-1.0-1.el9.x86_64.rpmNote: 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:
dnf install -y oracle-database-preinstall-23aiPurpose: The preinstall package automatically configures all the required kernel parameters, user limits, and creates the
oracleuser 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:
dnf -y localinstall /tmp/oracle-database-free-23ai-1.0-1.el9.x86_64.rpmResult: The software is installed to the following
ORACLE_HOME:/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
export DB_PASSWORD=SysPassword1Note: Replace
SysPassword1with 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
(echo "${DB_PASSWORD}"; echo "${DB_PASSWORD}";) | /etc/init.d/oracle-free-23ai configureStep 3: Review the Output
The configuration script performs the following steps:
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:
| Attribute | Value |
|---|---|
| Global Database Name | FREE |
| System Identifier (SID) | FREE |
| Pluggable Database | FREEPDB1 |
| PDB Connect String | localhost.localdomain/FREEPDB1 |
| CDB Connect String | localhost.localdomain |
Log Files: For further details, check the log files at:
/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:
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
export PATH=$ORACLE_HOME/bin:$PATHStep 2: Connect to the Root Container (CDB)
sqlplus sys/SysPassword1@//localhost:1521/free as sysdbaStep 3: Connect to the Pluggable Database (PDB)
sqlplus sys/SysPassword1@//localhost:1521/freepdb1 as sysdbaStep 4: Manage the Service
You can stop and start the database service from the root user with the following commands:
# Stop the database
/etc/init.d/oracle-free-23ai stop
# Start the database
/etc/init.d/oracle-free-23ai startThe Complete Installation Flow
┌─────────────────────────────────────────────────────────────────┐
│ 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
| Item | Path / Value |
|---|---|
| ORACLE_HOME | /opt/oracle/product/23ai/dbhomeFree |
| Global Database Name | FREE |
| SID | FREE |
| PDB Name | FREEPDB1 |
| Listener Port | 1521 |
| CDB Connect String | localhost:1521/free |
| PDB Connect String | localhost:1521/freepdb1 |
| Service Script | /etc/init.d/oracle-free-23ai |
| Log Directory | /opt/oracle/cfgtoollogs/dbca/FREE/ |
Advantages of RPM Installation
| Advantage | Description |
|---|---|
| Simplicity | Single command to install the software |
| Automated Prerequisites | Preinstall package handles kernel parameters and user setup |
| Fast Setup | Database can be created in minutes |
| Standard Paths | Uses standard Oracle paths for easy management |
| Service Integration | Includes init.d scripts for service management |
| Free to Use | No support contract required |
Best Practices
| Practice | Description |
|---|---|
| Use Secure Passwords | Set strong passwords for SYS, SYSTEM, and PDBADMIN |
| Configure the Firewall | Allow port 1521 for database connections |
| Set SELinux to Permissive | Required for smooth installation |
| Monitor Log Files | Review logs in /opt/oracle/cfgtoollogs/dbca/FREE/ |
| Back Up the Database | Perform regular backups once the database is in use |
| Use the Service Script | Use /etc/init.d/oracle-free-23ai for start/stop |
| Document Configuration | Keep a record of passwords and connection strings |
Troubleshooting Common Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| RPM installation fails | Missing dependencies | Run dnf install -y oracle-database-preinstall-23ai first |
| Database creation fails | Password too weak | Use a password with at least 8 characters, 1 uppercase, 1 lowercase, 1 digit |
| Listener not starting | Port 1521 in use | Check for conflicting services on port 1521 |
| Cannot connect | Wrong connect string | Verify the service name (free or freepdb1) |
| Service won't start | Wrong permissions | Run the service script as root |
| SELinux blocks installation | SELinux enforcing | Set SELinux to permissive and reboot |
| Firewall blocks connections | Firewall enabled | Configure or disable the firewall |
Summary
Installing Oracle Database 23ai Free on Oracle Linux 9 using the RPM involves the following key steps:
Configure the Hosts File: Set the fully qualified hostname
Install the Preinstall Package:
dnf install -y oracle-database-preinstall-23aiInstall the 23ai RPM:
dnf -y localinstall /tmp/oracle-database-free-23ai-*.rpmCreate the Database: Run
/etc/init.d/oracle-free-23ai configureConnect and Use: Connect to the CDB or PDB using SQL*Plus
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
FREEwith a PDB calledFREEPDB1The ORACLE_HOME is
/opt/oracle/product/23ai/dbhomeFreeThe listener port is
1521The 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