Install Oracle Database 23AI on Oracle Linux OEL9

This article presents how to install Oracle 23AI Release on Oracle Enterprise Linux 9 (OEL9) using RPM.

Read following article how to install Oracle Enterprise Linux 9: Install Oracle Linux 9 (OEL9) (for comfort set 8G memory for your virtual machine before proceeding with Oracle software installation).


Software for 23AI is available here

Original Oracle documentation for installation 23ai for Linux

Database Installation Guide for Linux(Release 23ai)

Database RPM to download

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

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

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

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

For example. oel9

Set hostname

hostnamectl set-hostname --static

It’s recommended to update OS with latest packages

dnf update

Extra preinstallation steps

Execute following command as user root

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

Details about steps executed by above statement can be found in file


It will configure following things:

  • download/install required extra packages
  • configure required os groups
  • create oracle user
  • setup kernel parameters
  • setup user limits
  • change boot settings
  • network specific parameters
  • disable transparent hugepages – Refer Oracle Note:1557478.1
  • disable defrag – Refer Oracle Note:1557478.1

Install main package

Install main package

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

It will configure oracle binaries in directory /opt/oracle/product/23ai/dbhomeFree/

Install database

To configure Oracle Database Free, optionally modify the parameters in /etc/sysconfig/oracle-free-23ai.conf and then run /etc/init.d/oracle-free-23ai configure as root

Install database with following command where “OraclePass23” is password for user SYS,SYSTEM,PDADMIN as root user

(echo "OraclePass23"; echo "OraclePass23";) | \
/etc/init.d/oracle-free-23ai configure

Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN 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
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.

Connect to Oracle Database using one of the connect strings:
Pluggable database:
Multitenant container database:

Next steps

Add following lines in /home/oracle/.bash_profile for user oracle

# Oracle Settings
export TMP=/tmp

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/23ai/dbhomeFree


export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384 
       ulimit -n 65536
       ulimit -u 16384 -n 65536


check environment settings as user oracle

sudo su - oracle

check environment

--I defined 4 aliases in .bash_profile of user oracle to make 
--administration easier :)

[oracle@oel9 ~]$ alias envo tns cdoh cdob
alias envo='env | grep ORACLE'
alias tns='cd $ORACLE_HOME/network/admin'
alias cdoh='cd $ORACLE_HOME'
alias cdob='cd $ORACLE_BASE'

--run alias command envo to display environment settings
[oracle@oel9 ~]$ envo
--run alias command cdob and cdoh --to check ORACLE_BASE, ORACLE_HOME [oracle@oel9 ~]$ cdob [oracle@oel9 oracle]$ pwd /opt/oracle [oracle@oel9 ~]$ cdohsqlplus [oracle@oel9 db_1]$ pwd /opt/oracle/product/23ai/dbhomeFree

Verify connection

[oracle@oel9 ~]$ sqlplus / as sysdba

SQL*Plus: Release - Production on Fri May 24 11:35:42 2024
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release - Develop, Learn, and Run for Free

SQL> show parameter db_name

------------------------------------ ----------- ------------------------------
db_name string FREE
SQL> alter session set container=FREEPDB1;
Session altered.

SQL> show con_id

SQL> show con_name

Listener status

[oracle@oel9 ~]$ lsnrctl status

LSNRCTL for Linux: Version - Production on 24-MAY-2024 11:38:11
Copyright (c) 1991, 2024, Oracle. All rights reserved.
Version TNSLSNR for Linux: Version - Production
Start Date 24-MAY-2024 11:15:34
Uptime 0 days 0 hr. 22 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
Default Service FREE
Listener Parameter File /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/oel9/listener/alert/log.xml
Listening Endpoints Summary...
Services Summary...
Service "1930b48dcdeb39e6e0630f02000a5022" has 1 instance(s).
Instance "FREE", status READY, has 1 handler(s) for this service...
Service "FREE" has 1 instance(s).
Instance "FREE", status READY, has 1 handler(s) for this service...
Service "FREEXDB" has 1 instance(s).
Instance "FREE", status READY, has 1 handler(s) for this service...
Service "freepdb1" has 1 instance(s).
Instance "FREE", status READY, has 1 handler(s) for this service...
The command completed successfully

Database and listener can be quickly started stopped with following commands as root

/etc/init.d/oracle-free-23ai stop
/etc/init.d/oracle-free-23ai start

Have a fun 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.