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

Oracle Database 19c Installation On Oracle Linux 7 (OL7): In this article describes the installation of Oracle Database 19c 64-bit on Oracle Linux 7 (OL7) 64-bit. The article is based on a server installation with a minimum of 2G swap and secure Linux set to permissive. An example of this type of Linux installation can be seen here.

  • Download Software
  • Hosts File
  • Oracle Installation Prerequisites
    • Automatic Setup
    • Manual Setup
    • Additional Setup
  • Unzip Files
  • Installation
    • Install Database Software Only
    • Configure listener and tns entry using netmgr
    • Run dbca to create a database
  • Post Installation

Download Software :

Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Universal Installations (OUI) Silent Installations

Hosts File :

The “/etc/hosts” file must contain a fully qualified name for the server.

[root@orakldba ~]# hostname
orakldba.localdomain
[root@orakldba ~]#
[root@orakldba ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.159.0.112 orakldba.localdomain orakldba

Oracle Installation Prerequisites :

Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.

Automatic Setup:

commands must run on root user.

yum search preinstall

yum install oracle-database-preinstall-19c.x86_64 -y

It is probably worth doing a full update as well, but this is not strictly speaking necessary.

yum update -y

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 https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

Manual Setup:

If you have not used the “oracle-database-preinstall-19c” package to perform all prerequisites, you will need to manually perform the following setup tasks.

Add the following lines to the /etc/sysctl.conf file, or in a file called “/etc/sysctl.d/98-oracle.conf”.

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Then run this following commands as root user :

/sbin/sysctl –p

Or

/sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

Add the following lines to this file /etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf.

oracle soft nofile  1024
oracle hard nofile  65536
oracle soft nproc   16384
oracle hard nproc   16384
oracle soft stack   10240
oracle hard stack   32768
oracle hard memlock 134217728
oracle soft memlock 134217728

The following packages are listed as required. Many of the packages should be installed already.

yum install -y bc
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y dtrace-modules
yum install -y dtrace-modules-headers
yum install -y dtrace-modules-provider-headers
yum install -y dtrace-utils
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libdtrace-ctf-devel
yum install -y libXrender
yum install -y libXrender-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y net-tools # Clusterware
yum install -y nfs-utils # ACFS
yum install -y python # ACFS
yum install -y python-configshell # ACFS
yum install -y python-rtslib # ACFS
yum install -y python-six # ACFS
yum install -y targetcli # ACFS
yum install -y smartmontools
yum install -y sysstat
yum install -y unixODBC

Create the new groups and users.

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper


useradd -u 54321 -g oinstall -G dba,oper oracle

Set the password for the “oracle” user.

passwd oracle

Additional Setup:

The following steps must be performed, whether you did the manual or automatic setup.

Set secure Linux to disabled by editing the “/etc/selinux/config” file.

SELINUX=permissive

Once the change is complete, restart the server or run the following command as ‘root’ user.

setenforce Permissive

If you have the Linux firewall enabled, you will need to stop and disable it.

  • run this following commands as root user :
    • systemctl stop firewalld
    • systemctl disable firewalld

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

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

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

xhost + <machine-name>

Add the following lines at the end of the “/home/oracle/.bash_profile” file.

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=orakldba.localdomain
export ORACLE_UNQNAME=ORCL
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=ORCL
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

After settings done on .bash_profile run :

[oracle@orakldba ~]$
[oracle@orakldba ~]$ . ./.bash_profile
[oracle@orakldba ~]$

Unzip software :

unzip -o /u01/LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.0.0/dbhome_1/

Installation:

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

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

Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.

[oracle@orakldba ~]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/
[oracle@orakldba dbhome_1]$ ./runInstaller
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 500 MB. Actual 5067 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-08-09_08-17-18PM. Please wait …[oracle@orakldba database]$

Proceed with the installation of your choice.

STEP: 1 INSTALL SOFTWARE ONLY :

Configuration Option:

Database Installation Option :

We choose single instance database installation.

Database Edition Option :

You can choose anyone which you need, here we select Enterprise Edition.

Installation Location :

Create Inventory :

Privileged Operating System Groups :

Root Script Execution Configuration :

Perform Prerequisite Checks :

Summary :

Install Product :

You need to click yes for executing root script :

Finish Software Installation :

STEP: 2 WE NEED TO CONFIGURE listener and tns entry using netmgr :

If you learn how listener.ora and tnsnames.ora file configured using netmgr then click here…!!!

After configured listner and tns entry using netmgr start listner :

[oracle@orakldba ~]$ netmgr
[oracle@orakldba ~]$
[oracle@orakldba ~]$
[oracle@orakldba ~]$
[oracle@orakldba ~]$ lsnrctl start LISTENER
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 12-AUG-2020 19:31:47
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Starting /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/orakldba/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orakldba.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orakldba.localdomain)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 12-AUG-2020 19:31:47
Uptime 0 days 0 hr. 0 min. 0 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/orakldba/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orakldba.localdomain)(PORT=1521)))
Services Summary…
Service "ORCL" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
[oracle@orakldba ~]$
[oracle@orakldba ~]$
[oracle@orakldba ~]$
[oracle@orakldba ~]$ lsnrctl status LISTENER
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 12-AUG-2020 19:32:03
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orakldba.localdomain)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 12-AUG-2020 19:31:47
Uptime 0 days 0 hr. 0 min. 15 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/orakldba/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orakldba.localdomain)(PORT=1521)))
Services Summary…
Service "ORCL" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
[oracle@orakldba ~]$
[oracle@orakldba ~]$
[oracle@orakldba ~]$

STEP: 3 Now Run dbca to create a database :

[oracle@orakldba ~]$ dbca

Choose Create a Database :

Choose Database Creation Mode :

Deployment Type :

Database Identification Details :

Storage Option :

Fast Recovery Area and Archiving Option :

Network Configuration :

Oracle Data Vault Option :

Configuration Options :

Management Option :

Database User Credentials :

Database Creation Option :

Summary :

Database Creation in Progress :

Post Installation :

Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.

ORCL:/u01/app/oracle/product/19.0.0/dbhome_1:Y

After Finished Database Creation Check Your database status :

I hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com.
Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You could write to mail me through : orakldba@gmail.com.

2 thoughts on “Oracle Database 19c Installation On Oracle Linux 7 (OL7)”

Leave a Comment