Skip to content
Home » Oracle » How to Install Oracle Database 19.18 on Linux

How to Install Oracle Database 19.18 on Linux

In this post, we'd like to directly install Oracle database 19.18 in a new database server. If you were looking for a procedure to patch DBRU 19.18 on an existing 19c database, you may follow the link and have a look.

Prepare a Database Server for 19c

To prepare a database server well for Oracle 19c, you may refer to the post: How to Install Oracle Database 19c on Linux.

Install Oracle Database 19.18 in Silent Mode

We follow the procedure of patching Oracle software before creating a database to make the installation faster and less risky for a new server.

What we use to patch the Oracle home is Database Release Update (DBRU) 19.18 (REL-JAN230131, 34765931) in this case.

Here are the steps we install Oracle Database 19.18 on Linux:

  1. Unzip Installation Package
  2. Install Newest OPatch
  3. Patch Oracle home + Install Oracle software only (Silent Mode)
  4. Network Configuration Assistant (Silent Mode)
  5. Database Creation Assistant (Silent Mode)
  6. Post Installation
  7. Check Patch Level

Furthermore, we run all installations without GUI (silent mode).

Unzip Installation Package

Supposed that you have uploaded the installation image of Oracle database 19c to the server, then we need to unzip it to the Oracle home.

[oracle@test ~]$ unzip -q /sources/LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

In order to prevent INS-08101 Unexpected Error, we should modify the following environment variable CV_ASSUME_DISTID.

[oracle@test ~]$ vi $ORACLE_HOME/cv/admin/cvu_config
...
CV_ASSUME_DISTID=OEL8

Install Newest OPatch

We just replace OPatch with the newest one, just like we did in the post: How to Patch Oracle Database 19c on Linux (DBRU 19.18).

After updating OPatch, let's see what version we have.

[oracle@test patches]$ opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

We have installed the newest OPatch 12.2.0.1.36.

To know if the server meets the requirements of Oracle product or not, we may perform a prerequisite check silently before installation.

Patch Oracle home + Install Oracle software only (Silent Mode)

We should unzip DBRU before running installer.

[oracle@test patches]$ unzip -q p34765931_190000_Linux-x86-64.zip -d /sources/patches/

The trick is to execute runInstaller -applyRU command to patch Oracle home before setting up, additionally, we do it in silent mode by specifying the flag -silent.

[oracle@test patches]$ cd $ORACLE_HOME
[oracle@test dbhome_1]$ ./runInstaller -applyRU /sources/patches/34765931/ -silent -noconfig -ignorePreReq oracle.installer.ignorePreReq=TRUE oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=dba oracle.install.db.OSDGDBA_GROUP=dba oracle.install.db.OSKMDBA_GROUP=dba oracle.install.db.OSRACDBA_GROUP=dba oracle.install.db.rootconfig.executeRootScript=true oracle.install.db.rootconfig.configMethod=ROOT

The execution result is as below:

Preparing the home to patch...
Applying the patch /sources/patches/34765931/...
Successfully applied the patch.
The log can be found at: /tmp/InstallActions2023-02-19_05-15-19PM/installerPatchActions_2023-02-19_05-15-19PM.log
Launching Oracle Database Setup Wizard...


 Enter password for 'root' user:
The response file for this session can be found at:
 /u01/app/oracle/product/19.0.0/dbhome_1/install/response/db_2023-02-19_05-15-19PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2023-02-19_05-15-19PM/installActions2023-02-19_05-15-19PM.log
Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2023-02-19_05-15-19PM

For more details, you may refer to the post: How to runInstaller 19c in Silent Mode.

Network Configuration Assistant (Silent Mode)

We prepare a response file for Net Configuration Assistant (NETCA) in silent mode.

[oracle@test dbhome_1]$ vi ~/netca.rsp
RESPONSEFILE_VERSION="19.0"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

Then we run netca like this:

[oracle@test dbhome_1]$ netca -silent -responsefile ~/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

Check the listener.

[oracle@test dbhome_1]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-FEB-2023 17:32:25

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                19-FEB-2023 17:31:51
Uptime                    0 days 0 hr. 0 min. 34 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

For more details, you may refer to the post: How to Run NETCA in Silent Mode.

To trace back the process, you may check the log of NETCA.

Database Creation Assistant (Silent Mode)

We run the following copy-able text.

dbca \
-silent \
-createDatabase \
-gdbName ORCLCDB \
-sid ORCLCDB \
-databaseConfigType SI \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName ORCLPDB \
-useLocalUndoForPDBs true \
-pdbAdminPassword Welcome1 \
-templateName /u01/app/oracle/product/19.0.0/dbhome_1/assistants/dbca/templates/General_Purpose.dbc \
-sysPassword Welcome1 \
-systemPassword Welcome1 \
-emConfiguration DBEXPRESS \
-emExpressPort 5500 \
-omsPort 0 \
-datafileJarLocation {ORACLE_HOME}/assistants/dbca/templates/ \
-datafileDestination /oradata/{DB_UNIQUE_NAME}/ \
-recoveryAreaDestination /oradata/fast_recovery_area/{DB_UNIQUE_NAME} \
-storageType FS \
-characterSet AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-listeners LISTENER \
-variables ORACLE_BASE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1,DB_UNIQUE_NAME=ORCLCDB,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=ORCLCDB,ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1,SID=ORCLCDB \
-initParams undo_tablespace=UNDOTBS1,sga_target=2328MB,db_block_size=8192BYTES,nls_language=AMERICAN,dispatchers=\(PROTOCOL=TCP\) \(SERVICE=ORCLCDBXDB\),diagnostic_dest={ORACLE_BASE},control_files=\("/oradata/{DB_UNIQUE_NAME}/control01.ctl", "/oradata/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl"\),remote_login_passwordfile=EXCLUSIVE,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=1000,pga_aggregate_target=776MB,nls_territory=AMERICA,local_listener=LISTENER_ORCLCDB,db_recovery_file_dest_size=100GB,open_cursors=300,log_archive_format=%t_%s_%r.dbf,compatible=19.0.0,db_name=ORCLCDB,db_recovery_file_dest=/oradata/fast_recovery_area/{DB_UNIQUE_NAME},audit_trail=db \
-memoryPercentage 40 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement false \
-redoLogFileSize 1024

The actual result is as below.

[oracle@test dbhome_1]$ dbca \
> -silent \
> -createDatabase \
> -gdbName ORCLCDB \
> -sid ORCLCDB \
> -databaseConfigType SI \
> -createAsContainerDatabase true \
> -numberOfPDBs 1 \
> -pdbName ORCLPDB \
> -useLocalUndoForPDBs true \
> -pdbAdminPassword zaq1xsw2 \
> -templateName /u01/app/oracle/product/19.0.0/dbhome_1/assistants/dbca/templates/General_Purpose.dbc \
> -sysPassword zaq1xsw2 \
> -systemPassword zaq1xsw2 \
> -emConfiguration DBEXPRESS \
> -emExpressPort 5500 \
> -omsPort 0 \
> -datafileJarLocation {ORACLE_HOME}/assistants/dbca/templates/ \
> -datafileDestination /oradata/{DB_UNIQUE_NAME}/ \
> -recoveryAreaDestination /oradata/fast_recovery_area/{DB_UNIQUE_NAME} \
> -storageType FS \
> -characterSet AL32UTF8 \
> -nationalCharacterSet AL16UTF16 \
> -listeners LISTENER \
> -variables ORACLE_BASE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1,DB_UNIQUE_NAME=ORCLCDB,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=ORCLCDB,ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1,SID=ORCLCDB \
> -initParams undo_tablespace=UNDOTBS1,sga_target=2328MB,db_block_size=8192BYTES,nls_language=AMERICAN,dispatchers=\(PROTOCOL=TCP\) \(SERVICE=ORCLCDBXDB\),diagnostic_dest={ORACLE_BASE},control_files=\("/oradata/{DB_UNIQUE_NAME}/control01.ctl", "/oradata/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl"\),remote_login_passwordfile=EXCLUSIVE,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=1000,pga_aggregate_target=776MB,nls_territory=AMERICA,local_listener=LISTENER_ORCLCDB,db_recovery_file_dest_size=100GB,open_cursors=300,log_archive_format=%t_%s_%r.dbf,compatible=19.0.0,db_name=ORCLCDB,db_recovery_file_dest=/oradata/fast_recovery_area/{DB_UNIQUE_NAME},audit_trail=db \
> -memoryPercentage 40 \
> -databaseType MULTIPURPOSE \
> -automaticMemoryManagement false \
> -redoLogFileSize 1024
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.

For more details, you may refer to the post: How to Run DBCA in Silent Mode.

To trace back the process, you may check the log of DBCA.

Post Installation

This step is the same as the post installation of Oracle database 19c on Linux.

Modify oratab

[oracle@test dbhome_1]$ vi /etc/oratab
...
ORCLCDB:/u01/app/oracle/product/19.0.0/dbhome_1:Y

Check Listener

[oracle@test dbhome_1]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-FEB-2023 18:38:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                19-FEB-2023 17:31:51
Uptime                    0 days 1 hr. 6 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ORCLCDB" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDBXDB" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "f4a6b3e0cb1c2e97e0530b01a8c059d0" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
The command completed successfully

Open Pluggable Database

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
SQL> alter pluggable database all save state instances=all;

Pluggable database altered.

We save current status for opening all PDB automatically in the future.

Check Patch Level

We have talked about how to check database version in the previous post. Now we have a good instance to make sure its patch level.

Software Patched Level

[oracle@test ~]$ opatch lspatches
34765931;DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.

Two release updates are found in the list, one is 19.3, the other is 19.18.

SQL Patched Level

SQL> select description from dba_registry_sqlpatch order by action_time desc;

DESCRIPTION
--------------------------------------------------------------------------------
DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)

As we expect, the SQL patched level keeps only the very last record which is DBRU 19.18, this is because we adopt the procedure of patching Oracle software before creating a database 19c to shorten the installation process.

Leave a Reply

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