Oracle 23ai Installation on Linux: In this article we will explain how to perform Oracle 23ai Installation on Linux. Here we use Oracle Linux Server 9.4 for this Oracle 23ai installation.
Steps to Install Oracle 23ai:
- Prerequisites:
- Install 23ai preinstall package:
- Automatic
- Manual
- Download the Oracle 23ai rpm
- Install 23ai preinstall package:
- Installation:
- Install Oracle Database 23ai Binary
- Verify ORACLE_HOME
- Configure Oracle Database
- Post Installation:
- Set Bash Profile
- Check and Verify the Database and Listener status
- Commands To Start/Stop and check Status of the Database:
- Notes:
Prerequisites:
Install 23ai preinstall package:
Automatic:
Firstly, Install 23ai preinstall package using dnf utility. This package will perform all the pre-requisites on your Linux server.
[root@oracle23ai ~]# dnf install oracle-database-preinstall-23ai.x86_64 -y
Oracle Linux 9 BaseOS Latest (x86_64) 7.1 kB/s | 4.2 kB 00:00
Oracle Linux 9 BaseOS Latest (x86_64) 948 kB/s | 80 MB 01:26
Oracle Linux 9 Application Stream Packages (x86_64) 8.5 kB/s | 4.5 kB 00:00
Oracle Linux 9 Application Stream Packages (x86_64) 1.3 MB/s | 67 MB 00:52
Oracle Linux 9 UEK Release 7 (x86_64) 6.6 kB/s | 3.5 kB 00:00
Oracle Linux 9 UEK Release 7 (x86_64) 1.2 MB/s | 76 MB 01:03
Last metadata expiration check: 0:00:16 ago on Wed 27 Aug 2025 03:13:51 PM IST.
Dependencies resolved.
======================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================
Installing:
oracle-database-preinstall-23ai x86_64 1.0-3.el9 ol9_appstream 35 k
Transaction Summary
======================================================================================================================================
Install 1 Package
Total download size: 35 k
Installed size: 79 k
Downloading Packages:
oracle-database-preinstall-23ai-1.0-3.el9.x86_64.rpm 50 kB/s | 35 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------
Total 49 kB/s | 35 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracle-database-preinstall-23ai-1.0-3.el9.x86_64 1/1
Running scriptlet: oracle-database-preinstall-23ai-1.0-3.el9.x86_64 1/1
Verifying : oracle-database-preinstall-23ai-1.0-3.el9.x86_64 1/1
Installed:
oracle-database-preinstall-23ai-1.0-3.el9.x86_64
Complete!
[root@oracle23ai ~]#Manual:
If the oracle-database-preinstall-23ai package is unavailable on your server, you can download it using wget and then install it manually.
wget https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpmDownload the Oracle 23ai rpm:
Download the Oracle 23ai rpm package on your server using wget.
[root@oracle23ai ~]# wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm
--2025-08-27 15:41:09-- https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm
Resolving download.oracle.com (download.oracle.com)... 23.215.164.121
Connecting to download.oracle.com (download.oracle.com)|23.215.164.121|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm [following]
--2025-08-27 15:41:10-- https://edelivery.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.201.129.217, 2600:140f:2e00:98e::366, 2600:140f:2e00:983::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.201.129.217|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm?AuthParam=1756289590_689fb3515aac64490716796c6ce3c4c8 [following]
--2025-08-27 15:41:10-- https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-23.9-1.el9.x86_64.rpm?AuthParam=1756289590_689fb3515aac64490716796c6ce3c4c8
Connecting to download.oracle.com (download.oracle.com)|23.215.164.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1412957372 (1.3G) [application/x-redhat-package-manager]
Saving to: ‘oracle-database-free-23ai-23.9-1.el9.x86_64.rpm’
oracle-database-free-23ai-23.9-1.el9.x8 100%[=============================================================================>] 1.32G 1.30MB/s in 21m 6s
2025-08-27 16:02:16 (1.06 MB/s) - ‘oracle-database-free-23ai-23.9-1.el9.x86_64.rpm’ saved [1412957372/1412957372]
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# ls -ltrh oracle-database-free-23ai-23.9-1.el9.x86_64.rpm
-rw-r--r--. 1 root root 1.4G Jul 30 16:45 oracle-database-free-23ai-23.9-1.el9.x86_64.rpm
[root@oracle23ai ~]#Installation:
Install Oracle Database 23ai Binary:
Execute below command to Install the downloaded 23ai rpm package using the dnf utility as root user on database server.
[root@oracle23ai ~]# dnf install oracle-database-free-23ai-23.9-1.el9.x86_64.rpm -y
Last metadata expiration check: 0:39:20 ago on Wed 27 Aug 2025 03:38:47 PM IST.
Dependencies resolved.
======================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================
Installing:
oracle-database-free-23ai x86_64 23.9-1 @commandline 1.3 G
Transaction Summary
======================================================================================================================================
Install 1 Package
Total size: 1.3 G
Installed size: 3.6 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-free-23ai-23.9-1.x86_64 1/1
Installing : oracle-database-free-23ai-23.9-1.x86_64 1/1
Running scriptlet: oracle-database-free-23ai-23.9-1.x86_64 1/1
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
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.
Verifying : oracle-database-free-23ai-23.9-1.x86_64 1/1
Installed:
oracle-database-free-23ai-23.9-1.x86_64
Complete!
[root@oracle23ai ~]#Verify ORACLE_HOME:
After completion of 23ai rpm package installation, check the Oracle home installed successfully and ready to be configured. The default ORACLE_HOME location is set to /opt/oracle/product/23ai/dbhomeFree.
[root@oracle23ai ~]# cd /opt/oracle/product/23ai/dbhomeFree
[root@oracle23ai dbhomeFree]#
[root@oracle23ai dbhomeFree]#
[root@oracle23ai dbhomeFree]# ls
addnode crypto deinstall hs jdk md oml4py oss QOpatch runInstaller sqlpatch xdk
assistants css demo install jlib mgw OPatch oui R schagent.conf sqlplus
bin ctx diagnostics instantclient ldap network opmn perl racg sdk srvm
cfgtoollogs cv dv inventory lib nls oracore plsql rdbms slax ucp
clone data env.ora javavm LICENSE odbc oraInst.loc precomp relnotes sqlcl usm
crs dbs has jdbc log olap ord python root.sh sqlj utl
[root@oracle23ai dbhomeFree]#Configure Oracle Database:
To configure Oracle Database Free, optionally modify the parameters in ‘/etc/sysconfig/oracle-free-23ai.conf’. Here we use the default template for this database configuration.
Contents of /etc/sysconfig/oracle-free-23ai.conf (Default Template):
===============================================
[root@oracle23ai ~]# cat /etc/sysconfig/oracle-free-23ai.conf
#This is a configuration file to setup the Oracle Database.
#It is used when running '/etc/init.d/oracle-free-23ai configure'.
# LISTENER PORT used Database listener, Leave empty for automatic port assignment
LISTENER_PORT=
# Character set of the database
CHARSET=AL32UTF8
# Database file directory
# If not specified, database files are stored under Oracle base/oradata
DBFILE_DEST=
# DB Domain name
DB_DOMAIN=
# Configure TDE
CONFIGURE_TDE=false
# Encrypt Tablespaces list, Leave empty for user tablespace alone or provide ALL for encrypting all tablespaces
# For specific tablespaces use SYSTEM:true,SYSAUX:false
ENCRYPT_TABLESPACES=
# SKIP Validations, memory, space
SKIP_VALIDATIONS=false
[root@oracle23ai ~]#Then run ‘/etc/init.d/oracle-free-23ai configure’ as root user to configure FREE database with FREE PDB and you can set your own password for the sys, system and pdbadmin user when prompted.
[root@oracle23ai ~]# /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:
/opt/oracle/cfgtoollogs/dbca/FREE.
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: oracle23ai.orakldba.com/FREEPDB1
Multitenant container database: oracle23ai.orakldba.com
[root@oracle23ai ~]#Post Installation:
Set Bash Profile:
Switch to Oracle user and set the .bash_profile. (Add the ORACLE_SID, ORACLE_BASE, ORACLE_HOME and update the PATH variable etc.
[root@oracle23ai ~]# su - oracle
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$ vi .bash_profile
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_UNQNAME=FREE
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/23ai/dbhomeFree
export ORA_INVENTORY=/opt/oracle/oraInventory
export ORACLE_SID=FREE
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[oracle@oracle23ai ~]$Check and Verify the Database and Listener status:
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai status
Status of the Oracle FREE 23ai service:
LISTENER status: RUNNING
FREE Database status: RUNNING
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# su - oracle
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$ ps -ef | grep pmon
oracle 57315 1 0 18:59 ? 00:00:00 db_pmon_FREE
oracle 58416 58378 0 19:24 pts/0 00:00:00 grep --color=auto pmon
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$ ps -ef | grep tns
root 7 2 0 18:29 ? 00:00:00 [kworker/R-netns]
root 12 2 0 18:29 ? 00:00:00 [kworker/u16:1-netns]
oracle 37900 1 0 18:49 ? 00:00:00 /opt/oracle/product/23ai/dbhomeFree/bin/tnslsnr LISTENER -inherit
oracle 58422 58378 33 19:24 pts/0 00:00:00 grep --color=auto tns
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$
[oracle@oracle23ai ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Wed Aug 27 19:26:47 2025
Version 23.9.0.25.07
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.9.0.25.07
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 FREEPDB1 READ WRITE NO
SQL>
SQL>
SQL> select name, database_role, open_mode, cdb from v$database;
NAME DATABASE_ROLE OPEN_MODE CDB
--------- ---------------- -------------------- ---
FREE PRIMARY READ WRITE YES
SQL>Commands To Start/Stop and check Status of the Database:
To Stop Database:
=======================
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai status
Status of the Oracle FREE 23ai service:
LISTENER status: RUNNING
FREE Database status: RUNNING
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai stop
Shutting down Oracle Database instance FREE.
Oracle Database instance FREE shut down.
Stopping Oracle Net Listener.
Oracle Net Listener stopped.
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai status
Status of the Oracle FREE 23ai service:
LISTENER status: STOPPED
FREE Database status: STOPPED
[root@oracle23ai ~]#
To Start Database:
=======================
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai status
Status of the Oracle FREE 23ai service:
LISTENER status: STOPPED
FREE Database status: STOPPED
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai start
Starting Oracle Net Listener.
Oracle Net Listener started.
Starting Oracle Database instance FREE.
Oracle Database instance FREE started.
[root@oracle23ai ~]#
[root@oracle23ai ~]#
[root@oracle23ai ~]# /etc/init.d/oracle-free-23ai status
Status of the Oracle FREE 23ai service:
LISTENER status: RUNNING
FREE Database status: RUNNING
[root@oracle23ai ~]#Notes:
You can use a Custom Template (modify the parameters in ‘/etc/sysconfig/oracle-free-23ai.conf’ as per your requirement) to configure a Container database (CDB) with a Pluggable database (PDB). Below is a sample custom configuration file template.
Custom Template:
# /etc/sysconfig/oracle-free-23ai.conf
# Custom configuration for Oracle Free 23ai Database
# Oracle Base directory (do not change unless you have a specific setup)
ORACLE_BASE=/opt/oracle
# Oracle Home directory
ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
# Database file directory
# If not specified, database files are stored under Oracle base/oradata
DBFILE_DEST=
# Configure TDE
CONFIGURE_TDE=false
# Encrypt Tablespaces list, Leave empty for user tablespace alone or provide ALL for encrypting all tablespaces
# For specific tablespaces use SYSTEM:true,SYSAUX:false
ENCRYPT_TABLESPACES=
# SKIP Validations, memory, space
SKIP_VALIDATIONS=false
# Name of the Oracle SID (Container Database Identifier)
ORACLE_SID=23AIDB
# Name of the Oracle PDB (Pluggable Database)
ORACLE_PDB=23AIPDB
# Password for SYS, SYSTEM, and PDBADMIN
ORACLE_PASSWORD=DbFree#2025
# Listener port (default is 1521)
LISTENER_PORT=1521
# Character set used by the database
CHARSET=AL32UTF8
# Auto-start the database on boot (yes/no)
AUTO_START=yes
# Memory allocation (use percentages or values like 2G, 1024M)
MEMORY_SIZE=2G
# Use automatic memory management (yes/no)
USE_AMM=yes
# Optional: Enable archive log mode (yes/no)
ARCHIVELOG_MODE=no
# Optional: Enable Oracle Diagnostic Logging
ENABLE_DIAG=yes
# Environment variables for tuning or troubleshooting
# Uncomment and set as needed
# NLS_LANG=AMERICAN_AMERICA.AL32UTF8
# LD_LIBRARY_PATH=$ORACLE_HOME/lib
# PATH=$ORACLE_HOME/bin:$PATH
# You can add other environment variables or shell logic belowI hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com. Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You can write to mail me through my Email.
Email :- orakldba@gmail.com
LinkedIn :- https://linkedin.com/in/prasantakirtaniya
Twitter :- https://twitter.com/prasantadba
Facebook Page :- https://www.facebook.com/orakldba
Website :- https://orakldba.com
ACE Profile :- https://ace.oracle.com/apex/ace/profile/prasantakirtaniya
Oracle Community :- https://community.oracle.com/customerconnect/profile/discussions/prasantakirtaniya
