How to Install Oracle database 23c on Linux Step by Step?
corpline

Download the Oracle 23c software
Oracle 23c Installation Prerequisites
Install the Oracle 23c Preinstall RPM
Install the Oracle 23c database
Create an Oracle 23c database

Download the Oracle 23c software

Download the Oracle 23c RPMs from MOS Download Oracle 23c RPMs.
oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
oracle-database-free-23c-1.0-1.el8.x86_64.rpm

Oracle 23c Installation Prerequisites

Before installing Oracle Database 23c, certain preinstallation steps need to be performed. To accomplish this, follow these instructions and paste the provided command in your terminal to execute the preinstallation process

Configure the host file

The server's fully qualified name should be included in the /etc/hosts file.
[root@dbdocs ~]# vi /etc/hosts
[root@dbdocs ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.178.21 dbdocs
[root@dbdocs ~]#
Ensure that the accurate hostname is set within the /etc/hostname file.
[root@dbdocs system-connections]# cat /etc/hostname
dbdocs
[root@dbdocs system-connections]#

Configure secure Linux to permissive

Configure secure Linux to permissive by editing the /etc/selinux/config file and ensure the SELINUX flag is set as follows

[root@dbdocs ~]# vi /etc/selinux/config
SELINUX=permissive
SELINUXTYPE=targeted

--Run the following command to apply the changes and make them take effect:
[root@dbdocs ~]# setenforce Permissive

Disable firewall

If you have the Linux firewall enabled, you will need to disable or configure the firewall rules appropriately. To disable the firewall, follow these steps:

[root@dbdocs ~]# systemctl stop firewalld
[root@dbdocs ~]# systemctl disable firewalld

Install the Oracle 23c Preinstall RPM

The Oracle Database Preinstallation RPM oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm takes care of creating the Oracle installation owner and groups automatically. It also configures the necessary kernel settings for Oracle Database installations.

The Oracle preinstall RPM requires the following packages to be available; otherwise, the installation will fail.
sysstat compat-openssl10 glibc-devel ksh libnsl make
 

Install the missing packages

The following packages are required for the Oracle 23c pre-installation RPM. To install these packages, you will need to set up a Yum repository.
If you haven't set up a Yum repository yet, please refer to the tutorial How to Configure an Offline Yum Repository in RHEL Linux for guidance.

[root@dbdocs yum.repos.d]# yum install sysstat compat-openssl10 glibc-devel ksh libnsl make
Red Hat Enterprise Linux 8.8.0                                                                                                          5.4 MB/s | 2.4 MB     00:00
Red Hat Enterprise Linux 8.8.0 - AppStream                                                                                               13 MB/s | 8.1 MB     00:00
Last metadata expiration check: 0:00:03 ago on Sun 25 Jun 2023 09:51:13 AM EDT.
Dependencies resolved.
========================================================================================================================================================================
 Package                              Architecture               Version                                               Repository                                  Size
========================================================================================================================================================================
Installing:
 compat-openssl10                     x86_64                     1:1.0.2o-4.el8_6                                      InstallMedia-AppStream                     1.1 M
 glibc-devel                          x86_64                     2.28-225.el8                                          InstallMedia                                83 k
 ksh                                  x86_64                     20120801-257.el8                                      InstallMedia-AppStream                     929 k
 libnsl                               x86_64                     2.28-225.el8                                          InstallMedia                               105 k
 make                                 x86_64                     1:4.2.1-11.el8                                        InstallMedia                               498 k
 sysstat                              x86_64                     11.7.3-9.el8                                          InstallMedia-AppStream                     426 k
Installing dependencies:
 glibc-headers                        x86_64                     2.28-225.el8                                          InstallMedia                               488 k
 kernel-headers                       x86_64                     4.18.0-477.10.1.el8_8                                 InstallMedia                                11 M
 libxcrypt-devel                      x86_64                     4.1.1-6.el8                                           InstallMedia                                25 k
 lm_sensors-libs                      x86_64                     3.4.0-23.20180522git70f7e08.el8                       InstallMedia                                59 k

Transaction Summary
========================================================================================================================================================================
Install  10 Packages

Total size: 14 M
Installed size: 17 M
Is this ok [y/N]: y
Downloading Packages:
Red Hat Enterprise Linux 8.8.0                                                                                                          213 kB/s | 5.0 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1
  Installing       : make-1:4.2.1-11.el8.x86_64                                                                                                                    1/10
  Running scriptlet: make-1:4.2.1-11.el8.x86_64                                                                                                                    1/10
  Installing       : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                        2/10
  Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                        2/10
  Installing       : kernel-headers-4.18.0-477.10.1.el8_8.x86_64                                                                                                   3/10
  Running scriptlet: glibc-headers-2.28-225.el8.x86_64                                                                                                             4/10
  Installing       : glibc-headers-2.28-225.el8.x86_64                                                                                                             4/10
  Installing       : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                            5/10
  Installing       : glibc-devel-2.28-225.el8.x86_64                                                                                                               6/10
  Running scriptlet: glibc-devel-2.28-225.el8.x86_64                                                                                                               6/10
  Installing       : sysstat-11.7.3-9.el8.x86_64                                                                                                                   7/10
  Running scriptlet: sysstat-11.7.3-9.el8.x86_64                                                                                                                   7/10
  Installing       : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                      8/10
  Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                      8/10
  Installing       : ksh-20120801-257.el8.x86_64                                                                                                                   9/10
  Running scriptlet: ksh-20120801-257.el8.x86_64                                                                                                                   9/10
  Installing       : libnsl-2.28-225.el8.x86_64                                                                                                                   10/10
  Running scriptlet: libnsl-2.28-225.el8.x86_64                                                                                                                   10/10
  Verifying        : glibc-devel-2.28-225.el8.x86_64                                                                                                               1/10
  Verifying        : glibc-headers-2.28-225.el8.x86_64                                                                                                             2/10
  Verifying        : kernel-headers-4.18.0-477.10.1.el8_8.x86_64                                                                                                   3/10
  Verifying        : libnsl-2.28-225.el8.x86_64                                                                                                                    4/10
  Verifying        : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                            5/10
  Verifying        : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                        6/10
  Verifying        : make-1:4.2.1-11.el8.x86_64                                                                                                                    7/10
  Verifying        : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                      8/10
  Verifying        : ksh-20120801-257.el8.x86_64                                                                                                                   9/10
  Verifying        : sysstat-11.7.3-9.el8.x86_64                                                                                                                  10/10
Installed products updated.

Installed:
  compat-openssl10-1:1.0.2o-4.el8_6.x86_64  glibc-devel-2.28-225.el8.x86_64  glibc-headers-2.28-225.el8.x86_64   kernel-headers-4.18.0-477.10.1.el8_8.x86_64
  ksh-20120801-257.el8.x86_64               libnsl-2.28-225.el8.x86_64       libxcrypt-devel-4.1.1-6.el8.x86_64  lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64
  make-1:4.2.1-11.el8.x86_64                sysstat-11.7.3-9.el8.x86_64

Complete!
[root@dbdocs yum.repos.d]#

Install the RPM


[root@dbdocs software]# dnf -y localinstall oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
Last metadata expiration check: 0:03:06 ago on Sun 25 Jun 2023 09:51:13 AM EDT.
Dependencies resolved.
========================================================================================================================================================================
 Package                                                Architecture                   Version                               Repository                            Size
========================================================================================================================================================================
Installing:
 oracle-database-preinstall-23c                         x86_64                         1.0-0.5.el8                           @commandline                          30 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 30 k
Installed size: 77 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1
  Installing       : oracle-database-preinstall-23c-1.0-0.5.el8.x86_64                                                                                              1/1
  Running scriptlet: oracle-database-preinstall-23c-1.0-0.5.el8.x86_64                                                                                              1/1
  Verifying        : oracle-database-preinstall-23c-1.0-0.5.el8.x86_64                                                                                              1/1
Installed products updated.

Installed:
  oracle-database-preinstall-23c-1.0-0.5.el8.x86_64

Complete!
[root@dbdocs software]#

Install the Oracle 23c database

During an RPM-based installation, various steps are performed. These include preinstallation checks, extraction of the database software, assignment of ownership to the preconfigured users and groups, management of the Oracle inventory, and execution of root operations needed to configure the Oracle Database software for creating and configuring a single-instance Oracle Database. If the minimum requirements for installation are not met, the RPM-based installation process will identify this and prompt you to complete the necessary preinstallation requirements.

For the Oracle Database 23c, it typically requires around 9 GB of disk space under the /opt directory. If the current disk partition doesn't have sufficient space available, you will need to either add space or mount an alternative partition as /opt/oracle. This particular disk partition is designated as the Oracle base, where the software and database will be located.
          
[root@dbdocs software]# dnf -y localinstall oracle-database-free-23c-1.0-1.el8.x86_64.rpm
Last metadata expiration check: 0:37:06 ago on Sun 25 Jun 2023 09:51:13 AM EDT.
Dependencies resolved.
========================================================================================================================================================================
 Package                                             Architecture                      Version                            Repository                               Size
========================================================================================================================================================================
Installing:
 oracle-database-free-23c                            x86_64                            1.0-1                              @commandline                            1.6 G

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 1.6 G
Installed size: 5.2 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-23c-1.0-1.x86_64                                                                                                          1/1
  Installing       : oracle-database-free-23c-1.0-1.x86_64                                                                                                          1/1
  Running scriptlet: oracle-database-free-23c-1.0-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-23c.conf' and then run '/etc/init.d/oracle-free-23c configure' as root.

  Verifying        : oracle-database-free-23c-1.0-1.x86_64                                                                                                          1/1
Installed products updated.

Installed:
  oracle-database-free-23c-1.0-1.x86_64

Complete!
[root@dbdocs software]#

Set the user profile


[root@dbdocs ~]# su - oracle

[oracle@dbdocs ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

umask 022
ORACLE_SID=dbdocs
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/product/23c/dbhomeFree
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TMP=/tmp
TMPDIR=/tmp
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export ORACLE_SID ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH TMP TMPDIR PATH
[oracle@dbdocs ~]$

-- Test the profile
[oracle@dbdocs ~]$ source .bash_profile
[oracle@dbdocs ~]$ echo $ORACLE_SID
dbdocs

Create an Oracle 23c database

Setup X Display

To set up the X display, please refer to the instructions provided in the How to Setup X Display in Linux tutorial

Create a database

To create an Oracle 23c database, log in as the oracle user and execute the dbca command using the command prompt
 [oracle@dbdocs ~]$ dbca

Choose the option "Create a database" from the selection menu
Create Database - Select Database operation
Enter the Global database name, Admin password, and Pluggable database name
Click on Next to continue
Create Database - Select Database Creation Mode
Validate the information and click on Finish to continue
Create Database - Summary
The database creation process has now commenced
Create Database - Progress Page
Oracle 23c database creation is complete now
Create Database - Finish
[oracle@dbdocs ~]$ sqlplus

SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Sun Jun 25 12:27:47 2023
Version 23.2.0.0.0
Copyright (c) 1982, 2023, Oracle.  All rights reserved.

Enter user-name: / as sysdba
Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0

SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>

Configure the listener.ora file

[oracle@dbdocs admin]$ vi listener.ora
LISTENER=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=dbdocs)(PORT=1521))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=free)
      (ORACLE_HOME=/opt/oracle/product/23c/dbhomeFree)
      (SID_NAME=free))
)
Start the listener
[oracle@dbdocs admin]$ lsnrctl start

LSNRCTL for Linux: Version 23.0.0.0.0 - Developer-Release on 25-JUN-2023 12:41:51

Copyright (c) 1991, 2023, Oracle.  All rights reserved.

Starting /opt/oracle/product/23c/dbhomeFree/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 23.0.0.0.0 - Developer-Release
System parameter file is /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/dbdocs/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbdocs)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbdocs)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 23.0.0.0.0 - Developer-Release
Start Date                25-JUN-2023 12:41:51
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/dbdocs/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbdocs)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "free" has 1 instance(s).
  Instance "free", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Configure the tnsnames.ora file

[oracle@dbdocs admin]$ vi tnsnames.ora
dbdocs =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dbdocs)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = free)
    )
  )

dbdocspdb =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dbdocs)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = dbdocspdb)
    )
  )
 
Test the connection to CDB and PDB
[oracle@dbdocs admin]$ tnsping dbdocs
TNS Ping Utility for Linux: Version 23.0.0.0.0 - Developer-Release on 25-JUN-2023 12:49:15
Copyright (c) 1997, 2023, Oracle.  All rights reserved.

Used parameter files:
/opt/oracle/product/23c/dbhomeFree/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dbdocs)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = free)))
OK (10 msec)


[oracle@dbdocs admin]$ tnsping dbdocspdb
TNS Ping Utility for Linux: Version 23.0.0.0.0 - Developer-Release on 25-JUN-2023 12:54:57
Copyright (c) 1997, 2023, Oracle.  All rights reserved.

Used parameter files:
/opt/oracle/product/23c/dbhomeFree/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dbdocs)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dbdocspdb)))
OK (10 msec)

 
To learn about Oracle 23c new features, follow this article Oracle 23c New Features: Redefine Your Business Success


Rate Your Experience

: 89 : 0

Online Tests
Read more

Oracle Database
Read more

MSSQL Database
Read more

PostGres Database
Read more

Linux
Read more

ASP/C#
Read more

Navigation Panel