Installing Oracle Database 19c on Oracle Linux 8

In one of my previous posts, I showed how to install Oracle Database 21c on Linux 7. In this post, I will show the step-by-step process of how to install and set up an Oracle Database 19c on Oracle Linux 8. For most of my installs, I use Linux 7. This is the first time I used Oracle Linux 8. So, thought of sharing this. I have used Tim Hall’s post – “Oracle Database 19c Installation On Oracle Linux 8 (OL8)”, as a reference . So let us begin with the software downloads. You can download Oracle Database from either MOS or Oracle edelivery:

I have configured Linux 8 on Oracle Virtual Box. I won’t go through the steps to setup OL8 in this post. The software I used are:


Once you have downloaded and setup OL8, there are some prerequisite setups that needs to be performed before kicking of the installation. These steps are shown below.

Get the IP Address using ‘ifconfig’ or ‘ip addr’ command. For example:

[root@oracledb19col8 ~]# ifconfig

Get the hostname.

[root@oracledb19col8 ~]# hostname

Amend the IP address and hostname to “/etc/hosts” file to resolve the hostname. You can use the vi editor for this.

[ Note: This can also be done with DNS ].   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Next, download “oracle-database-preinstall-19c” package. This package will perform all the setups that are necessary to install 19c.

[root@oracledb19col8 ~]# dnf install -y oracle-database-preinstall-19c


  ksh-20120801-254.0.1.el8.x86_64                       libaio-devel-0.3.112-1.el8.x86_64
  libnsl-2.28-151.0.1.el8.x86_64                        lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64
  oracle-database-preinstall-19c-1.0-2.el8.x86_64       sysstat-11.7.3-6.0.1.el8.x86_64


The next step is not mandatory. But I ran the ‘yum update’ because I wanted to make sure I had also the latest OS packages. It might take a while for all the packages to be installed.

[root@oracledb19col8 ~]# yum update -y --skip-broken

Edit “/etc/selinux/config” file and set “SELINUX=permissive“. It is recommended that you restart the server after this step.

[root@oracledb19col8 ~]# vi /etc/selinux/config

Disable firewall.

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

Create the directory structure for Oracle 19c to be installed and grant privileges.

Change the password of “oracle” user.

[root@oracledb19col8 ~]# passwd oracle

Login using “oracle” user.

[root@oracledb19col8 ~]# su - oracle

Unzip the Oracle software in ‘/u01/app/oracle/product/19c/dbhome_1’ directory, using the ‘unzip’ command as shown below. We’ll set this path as the ORACLE_HOME later on during the installation.

[oracle@oracledb19col8 ~]# mkdir -p /u01/app/oracle/product/19c/dbhome_1
[oracle@oracledb19col8 ~]# mkdir -p /u02/oradata
[oracle@oracledb19col8 ~]# chown -R oracle:oinstall /u01 /u02
[oracle@oracledb19col8 ~]# chmod -R 777 /u01 /u02

Create a directory for hosting the scripts and navigate to the directory.

[oracle@oracledb19col8 ~]# mkdir /home/oracle/scripts

Create an environment file called “” using the script below.

[oracle@oracledb19col8 ~]# cat > /home/oracle/scripts/ <<EOF
> # Oracle Settings
> export TMP=/tmp
> export TMPDIR=\$TMP
> export
> export ORACLE_UNQNAME=cdb1
> export ORACLE_BASE=/u01/app/oracle
> export ORACLE_HOME=\$ORACLE_BASE/product/19c/dbhome_1
> export ORA_INVENTORY=/u01/app/oraInventory
> export ORACLE_SID=cdb1
> export PDB_NAME=pdb1
> export DATA_DIR=/u02/oradata
> 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

Issue the following command to add the reference of the environment file created above in the “/home/oracle/.bash_profile”.

[oracle@oracledb19col8 ~]# echo ". /home/oracle/scripts/" >> /home/oracle/.bash_profile

Copy the Oracle software that you have downloaded to a directory. I have copied it under dbhome1.

[oracle@oracledb19col8 dbhome_1]$ ls -lrt
total 2987996
-rw-r--r--. 1 oracle oinstall 3059705302 Nov 17 02:06

Unzip the Oracle software in ‘/u01/app/oracle/product/19c/dbhome_1’ directory, using the ‘unzip’ command as shown below. We’ll set this path as the ORACLE_HOME later on during the installation.

[oracle@oracledb19col8 dbhome_1]$ unzip -q
[oracle@oracledb19col8 dbhome_1]$ ls
addnode     clone  cv      deinstall    drdaas   hs             javavm  ldap                          mgw      olap     ord   owm      QOpatch  relnotes       runInstaller   sqldeveloper  srvm      utl
apex        crs    data    demo         dv       install        jdbc    lib                           network  OPatch   ords  perl     R        schagent.conf  sqlj          suptools  wwg
assistants  css    dbjava  diagnostics  env.ora  instantclient  jdk  nls      opmn     oss   plsql    racg    sdk            sqlpatch      ucp       xdk
bin         ctx    dbs     dmu          has      inventory      jlib    md                            odbc     oracore  oui   precomp  rdbms  slax           sqlplus       usm

This completes all the prerequite steps and now we are all set to kick off the installation.


For installing Oracle, you can either chose to use the Interactive mode or the Silent mode. The interactive mode would open up the GUI screens and user input would be required at every step, whereas, for the silent mode, all the required parameters are passed using the command line, and hence, it does not display any screens.

For interactive mode, I generally launch the installer through MobaXterm. Download MobaXterm on the Host machine, open a console and connect to your Linux machine using ‘ssh’ and IP address of the Linux machine with oracle user, as shown in the screenshot below.

Navigate to the folder where you have unzipped the Oracle using MobaXterm console and execute ‘runInstaller’.

[oracle@oracledb19col8 ~]$ cd /u01/app/oracle/product/19c/dbhome_1
[oracle@oracledb19col8 dbhome_1]$ ./runInstaller

Note: If you are installing the software on Linux 8, you will get the following error when the installer is launched.

Execute the following command before you launch the installer, to get around the above error.

[oracle@oracledb19col8 dbhome_1]$ export CV_ASSUME_DISTID=OEL7.6

Now, if you execute the runInstaller, if will work just fine, and the installer would open without any issues.

You can go through the subsequent steps in the interactive mode to complete the installation. However, for this post, we are going use the silent mode to install the software. You can find more details on the silent more here.

To install Oracle using the silent installation, login as oracle user, navigate to the folder where you have unzipped the software, and run the following command.

[oracle@oracledb19col8 dbhome_1]$ export CV_ASSUME_DISTID=OEL7.6

Now launch the installer using command line as follows:

[oracle@oracledb19col8 dbhome_1]$ ./runInstaller -ignorePrereq -waitforcompletion -silent     \
>     -responseFile ${ORACLE_HOME}/install/response/db_install.rsp               \
>     oracle.install.option=INSTALL_DB_SWONLY                                    \
>     ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                                         \
>     UNIX_GROUP_NAME=oinstall                                                   \
>     INVENTORY_LOCATION=${ORA_INVENTORY}                                        \
>     SELECTED_LANGUAGES=en,en_GB                                                \
>     ORACLE_HOME=${ORACLE_HOME}                                                 \
>     ORACLE_BASE=${ORACLE_BASE}                                                 \
>     oracle.install.db.InstallEdition=EE                                        \
>     oracle.install.db.OSDBA_GROUP=dba                                          \
>     oracle.install.db.OSBACKUPDBA_GROUP=dba                                    \
>     oracle.install.db.OSDGDBA_GROUP=dba                                        \
>     oracle.install.db.OSKMDBA_GROUP=dba                                        \
>     oracle.install.db.OSRACDBA_GROUP=dba                                       \
>     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                                 \
Launching Oracle Database Setup Wizard...

On successful completion, the installer will prompt to run the root scripts.

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/
        2. /u01/app/oracle/product/19c/dbhome_1/

Execute /u01/app/oraInventory/ on the following nodes:
Execute /u01/app/oracle/product/19c/dbhome_1/ on the following nodes:

Successfully Setup Software.

Login as a root user and execute the scripts as shown below.

[root@oracledb19col8 oraInventory]# sh
[root@oracledb19col8 dbhome_1]# sh

Database Creation

This should complete the installation process. The next stage will be to create the database.

Before we create the database, the first thing we need to do is to start the listener services, using “lsnrctl start”.

[oracle@oracledb19col8 ~]$ lsnrctl start

LSNRCTL for Linux: Version - Production on 10-JAN-2022 21:40:12

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

Starting /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/oracledb19col8/listener/alert/log.xml

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version - Production
Start Date                10-JAN-2022 21:40:12
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracledb19col8/listener/alert/log.xml
Listening Endpoints Summary...
The listener supports no services
The command completed successfully

Once the listener is up and running, you need to create the database using the Database Configuration Assistant (DBCA). This can be done using the interactive mode by issuing the dbca command, through MobaXterm. Once you execute the dbca command, the GUI should pop up .

OR, you can opt the Silent mode, as I have done below.

dbca -silent -createDatabase                                                   \
     -templateName General_Purpose.dbc                                         \
     -gdbname ${ORACLE_SID} -sid  ${ORACLE_SID} -responseFile NO_VALUE         \
     -characterSet AL32UTF8                                                    \
     -sysPassword Welcome1                                                 \
     -systemPassword Welcome1                                              \
     -createAsContainerDatabase true                                           \
     -numberOfPDBs 1                                                           \
     -pdbName ${PDB_NAME}                                                      \
     -pdbAdminPassword Welcome1                                            \
     -databaseType MULTIPURPOSE                                                \
     -memoryMgmtType auto_sga                                                  \
     -totalMemory 2000                                                         \
     -storageType FS                                                           \
     -datafileDestination "${DATA_DIR}"                                        \
     -redoLogFileSize 50                                                       \
     -emConfiguration NONE                                                     \

This would create the database for you. Now you have successfully installed Oracle Database 19c.

[oracle@oracledb19col8 ~]$ sqlplus / as sysdba
SQL> Select BANNER_FULL from v$version;

-----------------------------------------------------------------------------------------------------Oracle Database 19c Enterprise Edition Release - Production

Post-Installation Steps

Create a script.

cat > /home/oracle/scripts/ <<EOF
. /home/oracle/scripts/
. oraenv
dbstart \$ORACLE_HOME

Create the script.

cat > /home/oracle/scripts/ <<EOF
. /home/oracle/scripts/
. oraenv
dbshut \$ORACLE_HOME

Change the ownership of the scripts using the following commands.

chown -R oracle:oinstall /home/oracle/scripts
chmod u+x /home/oracle/scripts/*.sh

Set the restart flag for the instance(and for every instance) to ‘Y’ in the ‘/etc/oratab’ file. You can use the ‘vi’ editor.

[oracle@oracledb19col8 ~]$ vi /etc/oratab

Here, we have created only one contaner database, so I have edited the line as highlighted below:

Once you have edited the ‘/etc/oratab’ file, you can now start and stop the database by calling the scripts, and respectively, from the “oracle” user.

Enable Oracle Managed Files (OMF) and set the pluggable databse to start automatically when the instance is started.

[oracle@oracledb19col8 ~]$ sqlplus / as sysdba <<EOF
> alter system set db_create_file_dest='${DATA_DIR}';
> alter pluggable database ${PDB_NAME} save state;
> exit;

Now, Oracle Database 19c is installed and ready to be used. Hope this helps. A big thanks , again, to Tim Hall for his tutorials and blog posts.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s