Oracle Database 19c Step by Step Installation On Oracle Linux 7.6

Download Software

Download the Oracle software from oracle edelivery.

Oracle Installation Prerequisites

Automatic Setup

Use the “oracle-database-preinstall-19c” package to perform all your prerequisite setup.

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

If you are using RHEL7 or CentOS7, you can pick up the PRM from the OL7 repository and install it. It will pull the dependencies from your normal repositories.

# yum install -y

Hosts File

Set a fully qualified name for the server in the “/etc/hosts” file.

< IP-address >  < fully-qualified-machine-name >  < machine-name >

# vi /etc/hosts

Set the correct hostname in the “/etc/hostname” file.# vi /etc/hostname

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

Additional Setup

Set the password for the “oracle” user.

# passwd oracle

Set secure Linux to permissive by editing the “/etc/selinux/config” file. # vi /etc/selinux/config


Once the change is complete, run the following command.

# setenforce Permissive

Disable the Linux firewall.

# systemctl stop firewalld
# systemctl disable firewalld

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

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

Reboot the server and login in with the oracle user using the password that we set above. Hope you haven’t forgotten your password if you have don’t worry just log in as the root user and reset the password again with passwd command.

# reboot

 Set Environment variables.

Add the following environment variables in the .bash_profile file.

$ vi .bash_profile

# Oracle Settingsexport TMP=/tmpexport TMPDIR=$TMP
export ORACLE_HOSTNAME=arandy.cmexport ORACLE_UNQNAME=cdb1export ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1export ORA_INVENTORY=/u01/app/oraInventoryexport ORACLE_SID=cdb1export PDB_NAME=pdb1export DATA_DIR=/u02/oradata
export PATH=/usr/sbin:/usr/local/bin:$PATHexport PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

$ . .bash_profile

Unzip the File 

Switch to the ORACLE_HOME directory and unzip the software directly into this path.Please note that after you must have downloaded the installation file you have to transfer them into the VM. This can be done with Filezilla or by using the scp command in the terminal.

$ unzip -oq /home/oracle/

Run the Installer

Log into the oracle user, start the Oracle Universal Installer (OUI) by issuing the following command and follow the GUI guided steps

$ ./runInstaller

Select the install option Set Up Software Only and click Next:

Select the install option Single Instance database installation and click Next:

Select the install option Enterprise Edition and click Next:

 Click Next.

 Click Next.

 Click Next.

 Click Next.

 Click Next.Make sure all Prerequisite Checks Succeeded.

Click Install.

Run the root scripts when prompted.

As a root user, execute the following script(s):
# /u01/app/oraInventory/
# /u01/app/oracle/product/19.0.0/dbhome_1/

Click Close.

You are now ready to create a database.

Database Creation

You create a database using the Database Configuration Assistant (DBCA). The interactive mode will display GUI screens to allow user input.
After successfully installing the database software, start the listener:

# Start the listener
$ lsnrctl start

To create the database using the interactive mode, start the Database Configuration Assistance (dbca) by issuing the following command and follow the GUI guided steps

# Interactive mode.
$ dbca

Click Next.

Typical configuration:Global database name: cdb1Storage type: File SystemDatabase file location: /u02/oradataFast Recovery Area (FRA): {ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}Database character set: AL32UTF8Adminitrative password: SysOracle_47   Pluggable database name: pdb1Click Next.

Click Finish.Database Summary.

Database creation finish.

Once the Database 19c successfully created, validate the database using the following command.

$ sqlplus / as sysdba
SQL> select banner_full from v$version;
SQL> select instance_name,status from v$instance;
SQL> select con_id, name, open_mode from v$pdbs;