Thursday, January 22, 2026

Installing Oracle AI Database 26ai (23.26.1) on CentOS Stream 9

 A comprehensive guide for installing Oracle AI Database 26ai Enterprise Edition on EC2 instances running CentOS Stream 9.

Overview

This guide covers the installation of Oracle AI Database 26ai (Release Update 23.26.1.0.0) using the Gold Image distribution. The installation uses silent mode for automation and creates a container database (CDB) with a pluggable database (PDB).

Version Information:

  • Oracle AI Database 26ai Enterprise Edition
  • Release: 23.26.1.0.0
  • Patch: 38743961 (Gold Image)
  • Platform: Linux x86-64

Prerequisites

System Requirements

Minimum Hardware:

  • CPU: 2+ cores recommended
  • RAM: 4 GB minimum (8 GB+ recommended for production)
  • Storage: 20 GB minimum for software and database files
  • Swap: 2 GB minimum

Supported Operating Systems:

  • Oracle Linux 9.2+ (UEK7 or RHCK)
  • Oracle Linux 8.6+ (UEK6/UEK7 or RHCK)
  • Red Hat Enterprise Linux 9.2+
  • CentOS Stream 9
  • SUSE Linux Enterprise Server 15 SP5

Verify Your System:

cat /etc/redhat-release
uname -r

Download Oracle Software

  1. Navigate to Oracle Support
  2. Search for Patch 38743961 - Database Release Update 23.26.1.0.0 Gold Image
  3. Download: p38743961_230000_Linux-x86-64.zip (2.2 GB)

Installation Steps

Step 1: Install Required Packages

Install all prerequisite packages required by Oracle Database:

sudo dnf install -y \
  bc \
  binutils \
  compat-openssl11 \
  elfutils-libelf \
  fontconfig \
  glibc \
  glibc-devel \
  glibc-headers \
  ksh \
  libaio \
  libasan \
  liblsan \
  libX11 \
  libXau \
  libXi \
  libXrender \
  libXtst \
  libxcrypt-compat \
  libgcc \
  libibverbs \
  librdmacm \
  libstdc++ \
  libxcb \
  libvirt-libs \
  make \
  policycoreutils \
  policycoreutils-python-utils \
  smartmontools \
  sysstat

Note: For Oracle Linux users, consider using the Oracle AI Database Preinstallation RPM which automatically configures the system and installs required packages.

Step 2: Create Oracle Groups

Create the required Oracle Inventory and database administration groups:

# Primary installation group
sudo /usr/sbin/groupadd -g 54321 oinstall

# Database administration groups
sudo /usr/sbin/groupadd -g 54322 dba
sudo /usr/sbin/groupadd -g 54323 oper
sudo /usr/sbin/groupadd -g 54324 backupdba
sudo /usr/sbin/groupadd -g 54325 dgdba
sudo /usr/sbin/groupadd -g 54326 kmdba
sudo /usr/sbin/groupadd -g 54330 racdba

Group Purposes:

  • oinstall: Oracle Inventory group (primary)
  • dba: Database Administrator (SYSDBA)
  • oper: Database Operator (SYSOPER)
  • backupdba: Backup and Recovery (SYSBACKUP)
  • dgdba: Data Guard (SYSDG)
  • kmdba: Encryption Key Management (SYSKM)
  • racdba: Real Application Clusters

Step 3: Create Oracle User

Create the oracle user for database installation:

sudo /usr/sbin/useradd -u 54321 -g oinstall \
  -G dba,backupdba,dgdba,kmdba,racdba oracle

(Optional) Set a password for the oracle user:

sudo passwd oracle

Step 4: Configure Resource Limits

Configure kernel resource limits for the oracle user:

sudo tee -a /etc/security/limits.conf << 'EOF'
# Oracle Database resource limits
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 28835840
oracle hard memlock 28835840
EOF

Limit Explanations:

  • nofile: Maximum number of open file descriptors
  • nproc: Maximum number of processes
  • stack: Maximum stack size (KB)
  • memlock: Maximum locked memory (KB)

Step 5: Create Directory Structure

Create the Oracle base, inventory, and staging directories:

# Create directories as root
sudo mkdir -p /u01/app/oracle
sudo mkdir -p /u01/app/oraInventory
sudo mkdir -p /u01/stage

# Set ownership
sudo chown -R oracle:oinstall /u01/app/oracle
sudo chown -R oracle:oinstall /u01/app/oraInventory
sudo chown oracle:oinstall /u01/stage

# Set permissions
sudo chmod -R 775 /u01/app

Directory Structure:

  • /u01/app/oracle: Oracle Base directory
  • /u01/app/oraInventory: Oracle Inventory location
  • /u01/stage: Staging area for installation files

Step 6: Upload and Extract Installation Files

Transfer the downloaded zip file to the staging directory and extract:

# Switch to oracle user
sudo su - oracle

# Create Oracle Home directory
mkdir -p /u01/app/oracle/product/23.0.0/dbhome_1

# Navigate to Oracle Home
cd /u01/app/oracle/product/23.0.0/dbhome_1

# Extract the Gold Image (assumes zip is in /u01/stage)
unzip -q /u01/stage/p38743961_230000_Linux-x86-64.zip

Important: The Gold Image contains both the Oracle Database software and the Release Update pre-applied.

Step 7: Run Silent Installation

Execute the Oracle installer in silent mode to install software and create the database:

./runInstaller -silent -createDatabase \
  -OSDBA dba \
  -OSBACKUPDBA backupdba \
  -OSDGDBA dgdba \
  -OSKMDBA kmdba \
  -OSRACDBA racdba \
  -OSOPER oper \
  -installEdition EE \
  -ORACLE_BASE /u01/app/oracle \
  -dataLocation /u01/app/oracle/oradata \
  -gdbName orcl23.example.com \
  -pdbName pdb1 \
  -dbSID orcl23 \
  -memoryLimit 4000 \
  -INVENTORY_LOCATION /u01/app/oraInventory \
  -useSamePasswordForAllSchemas \
  -ignorePrereq

Installation Parameters:

  • -createDatabase: Creates database during installation
  • -installEdition EE: Enterprise Edition
  • -gdbName: Global database name (CDB)
  • -pdbName: Pluggable database name
  • -dbSID: System identifier
  • -memoryLimit: Memory in MB (4000 = 4 GB)
  • -useSamePasswordForAllSchemas: Simplifies password management
  • -ignorePrereq: Bypasses prerequisite checks (use cautiously)
  • -executeConfigTools: Runs NETCA and DBCA automatically (The -executeConfigTools flag can only be used for an Oracle home software that has been already installed using the configure or upgrade options. Ensure that the orainstRoot.sh script, from the inventory location, has been run.)

You'll be prompted to enter passwords for database schemas (SYS, SYSTEM, PDBADMIN).

Step 8: Execute Root Scripts

After installation completes, run the required root scripts as indicated by the installer:

# Exit oracle user session
exit

# Run as root
sudo /u01/app/oraInventory/orainstRoot.sh
sudo /u01/app/oracle/product/23.0.0/dbhome_1/root.sh

These scripts configure inventory permissions and set up Oracle Restart components.

Step 9: Configure Network and Database (If Not Auto-Configured)

If you didn't use -executeConfigTools, run the configuration manually:

# Switch back to oracle user
sudo su - oracle

# Navigate to Oracle Home
cd /u01/app/oracle/product/23.0.0/dbhome_1

# Run configuration tools
./runInstaller -silent \
  -useSamePasswordForAllSchemas \
  -executeConfigTools

This will:

  1. Run NETCA (Network Configuration Assistant) to create the listener
  2. Run DBCA (Database Configuration Assistant) to create the database

Expected Output:

  • NETCA creates listener on port 1521
  • DBCA creates CDB orcl23 with PDB pdb1
  • Database creation takes 3-5 minutes

Post-Installation Configuration

Step 10: Set Environment Variables

Add Oracle environment variables to the oracle user's profile:

# Switch to oracle user
sudo su - oracle

# Edit .bash_profile
cat >> ~/.bash_profile << 'EOF'

# Oracle Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/23.0.0/dbhome_1
export ORACLE_SID=orcl23
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
EOF

# Apply changes
source ~/.bash_profile

Step 11: Verify Installation

Check the installed patches and database version:

# Verify patches
$ORACLE_HOME/OPatch/opatch lspatches

Expected Output:

38743688;OCW RELEASE UPDATE 23.26.1.0.0 (GOLD IMAGE)
38743669;Database Release Update : 23.26.1.0.0
OPatch succeeded.

Step 12: Test Database Connectivity

Connect to the database using SQLcl or SQL*Plus:

# Using SQLcl (if installed)
sql system@localhost/pdb1.example.com

# Or using SQL*Plus
sqlplus system@localhost/pdb1.example.com

Verify Version:

SELECT banner FROM v$version;

Expected Output:

Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production

Step 13: Configure Automatic Startup (Optional)

Edit /etc/oratab to enable automatic startup:

sudo vi /etc/oratab

Change the last field from N to Y:

orcl23:/u01/app/oracle/product/23.0.0/dbhome_1:Y

Create a systemd service for automatic startup:

sudo tee /etc/systemd/system/oracle-database-orcl23.service << 'EOF'
[Unit]
Description=Oracle Database Service
After=network.target

[Service]
Type=forking
User=oracle
Group=oinstall
Environment="ORACLE_HOME=/u01/app/oracle/product/23.0.0/dbhome_1"
Environment="ORACLE_SID=orcl23"
Environment="PATH=/u01/app/oracle/product/23.0.0/dbhome_1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"
Environment="LD_LIBRARY_PATH=/u01/app/oracle/product/23.0.0/dbhome_1/lib"
ExecStart=/bin/bash /u01/app/oracle/product/23.0.0/dbhome_1/bin/dbstart /u01/app/oracle/product/23.0.0/dbhome_1
ExecStop=/bin/bash /u01/app/oracle/product/23.0.0/dbhome_1/bin/dbshut /u01/app/oracle/product/23.0.0/dbhome_1
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF

# Enable the service
sudo systemctl daemon-reload
sudo systemctl enable oracle-database-orcl23.service

Database Management

Starting and Stopping the Database

Manual Start:

# Start listener
lsnrctl start

# Start database
sqlplus / as sysdba
SQL> STARTUP;
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
SQL> EXIT;

Manual Stop:

sqlplus / as sysdba
SQL> SHUTDOWN IMMEDIATE;
SQL> EXIT;

# Stop listener
lsnrctl stop

Using dbstart/dbshut:

# Start
dbstart $ORACLE_HOME

# Stop
dbshut $ORACLE_HOME

Connecting to Databases

Connect to CDB:

sqlplus / as sysdba
# or
sqlplus sys@localhost/orcl23.example.com as sysdba

Connect to PDB:

sqlplus system@localhost/pdb1.example.com

Switch Between Containers:

-- Show current container
SHOW CON_NAME;

-- Switch to PDB
ALTER SESSION SET CONTAINER = pdb1;

-- Switch to CDB root
ALTER SESSION SET CONTAINER = CDB$ROOT;

Troubleshooting

Common Issues

Issue: Installation fails with prerequisite check errors

  • Solution: Review /u01/app/oraInventory/logs/InstallActions*.log
  • Consider using -ignorePrereq flag (not recommended for production)

Issue: Listener not starting

# Check listener status
lsnrctl status

# Check listener.ora
cat $ORACLE_HOME/network/admin/listener.ora

# Restart listener
lsnrctl stop
lsnrctl start

Issue: Database not accessible

# Check database status
ps -ef | grep pmon

# Check alert log
tail -f $ORACLE_BASE/diag/rdbms/orcl23/orcl23/trace/alert_orcl23.log

Issue: Memory allocation errors

  • Increase system memory or reduce -memoryLimit parameter
  • Check available memory: free -h

Log Locations

  • Installation logs: /u01/app/oraInventory/logs/
  • DBCA logs: /u01/app/oracle/cfgtoollogs/dbca/orcl23/
  • Alert log: $ORACLE_BASE/diag/rdbms/orcl23/orcl23/trace/alert_orcl23.log
  • Listener log: $ORACLE_BASE/diag/tnslsnr/$HOSTNAME/listener/trace/listener.log

Security Considerations

  1. Change default passwords immediately for SYS, SYSTEM, and PDBADMIN users
  2. Configure firewall rules to restrict database port access (1521)
  3. Enable SSL/TLS for encrypted connections in production
  4. Regular patching: Subscribe to Oracle Critical Patch Updates (CPU)
  5. Audit configuration: Enable database auditing for compliance
  6. Backup strategy: Implement RMAN backup procedures

Storage Configuration

# Example: Mount additional EBS volume for data files
sudo mkfs.xfs /dev/nvme1n1
sudo mkdir -p /u02/oradata
sudo mount /dev/nvme1n1 /u02/oradata
sudo chown -R oracle:oinstall /u02/oradata

# Add to /etc/fstab for persistence
echo "/dev/nvme1n1 /u02/oradata xfs defaults,nofail 0 2" | sudo tee -a /etc/fstab

References