How to Install Oracle Database 23ai on Oracle Linux 9

Hello everyone, welcome to my blog. In this article, we will install Oracle Database 23ai on Oracle Linux 9. Recently, I am trying to get deeper understanding about Oracle Database. It is a really great database system for GIS and of-course for many other things. I am not going to explain what Oracle Database is. Let’s jump to the tutorial straight away.

Steps to Install Oracle Database 23ai on Oracle Linux 9

I assume you already had Oracle Linux 9 up and running on your PC or Virtual Machine. I am installing my Oracle Linux on my Proxmox. It’s running very well.

Step 1. Install Prerequisites

Before we can actually install the Oracle Database, first we need to install some packages. Open Terminal and as root, execute this command below

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

Step 2. Download Oracle Database 23ai RPM package

Navigate to the download link below and choose the right version that match

https://www.oracle.com/database/technologies/free-downloads.html

You should have a file called: oracle-database-free-23ai-1.0-1.el9.x86_64.rpm.

Step 3. Install Oracle Database RPM package

Open Terminal and cd to the download folder where you save the RPM package from step 2. In my case, it would be :

sudo su
cd /home/oracle/Downloads

Now execute this command to install the RPM package

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

Output:

Wait until the installation process completed.

Step 4. Creating and Configuring an Oracle Database

Now we are going to create a container database with one pluggable database and then configure the listener at the Oracle default port 1521.

sudo -s
/etc/init.d/oracle-free-23ai configure

On the first step, we need to specify a password that will be used for database accounts.

Make sure your password meets the password complexity required such as 1 uppercase, 1 lowercase and 1 digit. Then the script will continue installing Oracle Database.

When finished, you will see something like this:

Step 5. Setting Oracle Database Free Environment Variables

Once the installation completed, we need to set the environment before we can use Oracle Database Free. Edit the bashrc file using your favorite text editor.

nano ~/.bashrc

And then add the following lines to the end of the bashrc file.

export ORACLE_SID=FREE 
export ORAENV_ASK=NO
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
. /opt/oracle/product/23ai/dbhomeFree/bin/oraenv

Now run this command:

source ~/.bashrc

Step 6. Connecting to Oracle Database Free

At this point we have successfully installed Oracle Database on Oracle Linux. Now let’s try to connect to it using sqlplus.

sqlplus sys as sysdba

You will need to enter your password we created earlier. When successful, you will see the sqlplus prompt like this

Conclusion

Installing Oracle Database 23ai in Oracle Linux is not too complicated. With a detailed instructions provided by Oracle, I can successfully installed this great database on my Linux. Let’s dig deeper this Oracle Database 23ai.