Step by Step Oracle Database 19c Installation On Oracle Linux 7 (OL7)

Oracle Database 19c is the latest version for production use and this article describes the all steps to install of Oracle Database 19c 64-bit on Oracle Linux 7 (OL7) 64-bit. This article is divided into several sections:

  1. Installation requirements Checklist
  2. Download Software
  3. Installation Prerequisites Steps
  4. Oracle Installation steps
  5. Database Creation
  6. Final Checking database: 


Installation requirements Checklist

Please check the checklists that your server hardware and configuration meet minimum requirements for this release, and can help you to ensure you carry out a successful installation. There are the basic requirements checklists to install Oracle Database 19c. 


Hardware: 

Physical RAM: At least 1 GB RAM for Oracle Database installations. 2 GB RAM recommended. At least 8 GB RAM for Oracle Grid Infrastructure installations.

Swap Space: 2 times the size of RAM. To check, 

Space requirement for Oracle 19c Software: Enterprise Edition Minimum 10G  


OS: 

Linux x86-64 operating system requirements - Oracle Linux 7.4 or Later / Red Hat Enterprise Linux 7.5 or later / SUSE Linux Enterprise Server 12 or later 


For full requirement checklists, Please see https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/oracle-database-installation-checklist.html#GUID-E847221C-1406-4B6D-8666-479DB6BDB046


Download Software

Download the latest Long Term Release Oracle Database 19c from https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c

Oracle also provides all supported database release software for all platforms on the Oracle Software Delivery Cloud: https://edelivery.oracle.com


Installation Prerequisites Steps 


Set hostname: 

To set the hostname "/etc/hosts" file, you must follow a fully qualified name as syntax.


<IP-address> <hostname> <machine-name>

To Set a fully qualified name for the server in the "/etc/hosts" file 

 # vi /etc/hosts

Change as example: 

127.0.0.1    localhost localhost.localdomain localhost4 localhost4.localdomain4
192.192.192.111 oradb.mydomain.org oradb


To set the correct hostname oradb.mydomain.org in the "/etc/hostname" file.

 # vi /etc/hostname


NB!! Make sure you can ping the hostname you added in the host file.

Stop Firewalld by using the command: systemctl stop firewalld

If you have the Linux firewall enabled, you will need to disable or configure it, as shown here. To disable it, do the following.

# systemctl stop firewalld
# systemctl disable firewalld


If you plan to use the "oracle-database-preinstall-19c" package to perform all your prerequisite setup, issue the following command.

# yum install -y oracle-database-preinstall-19c


Update for optional: It is probably worth doing a full update as well, but this is optional.

# yum update -y

 It's worth running all the YUM commands listed in the manual setup section. Depending on the OS package groups you have selected, some additional packages might also be needed.

RPM for RHEL7 or CentOS7: 

 Install PRM which will pick up from the OL7 repository and install it. PRM will pull the dependencies from your normal repositories.

# yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

Set the password for the "oracle" user.

passwd oracle

Enter New password and retype confirm password which will be used for Oracle User. 

Create Oracle Home Directory: 

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
mkdir -p /u02/oradata
chown -R oracle:oinstall /u01 /u02
chmod -R 775 /u01 /u02


Unless you are working from the console, or using SSH tunnelling, login as root and issue the following command.

xhost +<machine-name>

 Unzip the File

# Unzip software.

cd $ORACLE_HOME
unzip -oq /path/to/software/LINUX.X64_193000_db_home.zip


Oracle Installation steps

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY


Switch to the ORACLE_HOME directory, unzip the software directly into this path and start the Oracle Universal Installer (OUI) by issuing one of the following commands in the ORACLE_HOME directory. The interactive mode will display GUI installer screens to allow user input, while the silent mode will install the software without displaying any screens, as all required options are already specified on the command line.

# Interactive mode.
./runInstaller


At now, proceed according OUI instruction and click next.....

Step1 : Click create and configure a single instance database

Step2 : Click Server class

Step3 : Select Enterprise Edition

Step 4:Choose location for ORACLE_BASE

Step 5: Select configuration type as General Purpose / Transaction Processing.

Step 6: Enter Database name

Step 7: Enter database file location

Step 8: Enable Archivelog mode option for database

Step 9: Enter SYS and SYSTEM user password

Step 10: Check OS groups for installation

Step 11: Check Prerequisite checks for 19c database installation

Step 12: Check Summary

Step 13: Run root.sh and Orainventory scripts :

 Run the root scripts when prompted.

As a root user, execute the following script(s):

    1. /u01/app/oraInventory/orainstRoot.sh

    2. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh

 

Step 14: Check database status

  •  Type sqlplus and enter,
  • type sys as sysdba and enter
  • give password and enter
  • type show con_name and enter

Commands and outputs are as like:


[oracle@oradb /]$ sqlplus

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 20 18:11:23 2020
Version 19.3.0.0.0

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

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL>


Oracle database 19c installation is completed successfully.


Database Creation

If you click option one in installation step 1, than you need to create database and you can create a database using the Database Configuration Assistant (DBCA). The interactive mode will display GUI screens to allow user input, while the silent mode will create the database without displaying any screens, as all required options are already specified on the command line.

# Start the listener.
lsnrctl start

# Interactive mode.
dbca

 Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.

cdb1:/u01/app/oracle/product/19.0.0/db_1:Y

Enable Oracle Managed Files (OMF) and make sure the PDB starts when the instance starts.


Start and Enjoy

At now, Playground is ready, so you start to play and enjoy.