Oracle Database 19c Installation On Oracle Linux 7

 This article is a step by step guide for installing Oracle Database 19c on the Oracle Enterprise Linux 7 (OL7).  The database created for demonstration purpose in this guide will use local file system.

This article describes how to install Oracle Database 19c Release 3 ( on Linux x86-64 systems (Oracle Linux 7.4).

 The procedures in this guide describe how to:

  • Configure your system to support Oracle Database
  • Install Oracle Database on a local file system by using the Typical Installation option
  • Configure a general-purpose Oracle Database that uses the local file system for database file storage

Oracle Official Documentation:

Server / Environment Details:

Operating System Name / Version Oracle Linux 7.4 (64 bit)
Oracle Database Version Oracle 19c (
Hostname demohost
IP Address
Database Name demodb
Database Owner User oracle

Download Software:

Download the Oracle software from OTN or MOS.

Network Configuration:

Ensure that the node name (demohost) is not included for the loopback address in the /etc/hosts file. It should be like below:   localhost.localdomain localhost

Also, the /etc/hosts file must contain a fully qualified name for the server. As shown below: demohost.localdomain demohost

Kindly update the hosts file accordingly. Screenshot for your reference:

Set secure Linux to permissive by editing the "/etc/selinux/config" file, update SELINUX flag to permissive.

[root@demohost ~]# vim /etc/selinux/config

Screenshot for your reference:

If Linux firewall is enabled, you will need to disable it. To disable it, do the following.

# systemctl stop firewalld
# systemctl disable firewalld

Configure  Linux Operating System Parameters for Oracle:

Kernel Parameters:

Verify that the kernel parameters mentioned in this section are set to values greater than or equal to the recommended values.

Create a file called "/etc/sysctl.d/98-oracle.conf" and give below mentioned parameters.

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


Run following command to change the current kernel parameters.
[root@demohost ~]# /sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

Resource Limits:

update the resource limits in the /etc/security/limits.conf configuration file for the Oracle installation owner by adding the following lines.

[root@demohost ~]# vim /etc/security/limits.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

Install Required Linux Packages for Oracle:

The OUI performs checks during installation to verify that it meets the appropriate operating system package requirements. 


Here used yum utility to install the packages. 

[root@demohost ~]# yum install -y binutils

Similarly, install all the missing packages.

Create oracle User and Directories:

Create the operating system user and groups that will be used to install and manage the Oracle Database. Create the directories in which the Oracle software will be installed.

[root@demohost ~]# groupadd -g 54300 oinstall
[root@demohost ~]# groupadd -g 54301 dba
[root@demohost ~]# groupadd -g 54302 oper
[root@demohost ~]# useradd -u 54300 -g oinstall -G dba,oper oracle
[root@demohost ~]# passwd oracle

[root@demohost ~]# mkdir -p /oracle_sw/db_sw
[root@demohost ~]# mkdir -p /u01/app/oracle
[root@demohost ~]# chown -R oracle:oinstall /u01
[root@demohost ~]# chown -R oracle:oinstall /oracle_sw/
[root@demohost ~]# chmod -R 775 /u01 /oracle_sw

Install Oracle Database:

Here, we will install Oracle Database software first. The database will be created later using Database Configuration Assistant (DBCA).

Login as root and issue the following command.

xhost +

Switch to oracle user. If using X emulation then set the DISPLAY environmental variable as follows:

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

For example:

[root@demohost ~]# xhost +
[root@demohost ~]# su - oracle
[oracle@demohost ~]$ cd /oracle_sw/db_sw/
[oracle@demohost db_sw]$ export DISPLAY=
[oracle@demohost db_sw]$ ./runInstaller

Kindly note that, database software is copied to '/oracle_sw/db_sw/' directory. Also, it will be  ORACLE_HOME as well.

Wait for few moments, then below screen will come.

Select "Set Up Software Only" Option and click Next.

Select "Select Single Instance Database Installation" Option and click Next.

Select "Enterprise Edition" Option and click Next.

Verify Oracle Base Directory and Click Next.

Verify Oracle Inventory and Group and Click Next.

Select "OS Groups" and click Next.

If you give the root password here, the root scripts will be executed by the installer itself. You don't have to execute the scripts manually. 

Once the prerequisites checks are completed, click Next. Don't ignore errors as it may impact next steps.

click Install.

Acknowledge the request to run root scripts by the installer.

Click Close.

Database Creation:

Set ORACLE_HOME and ORACLE_BASE Environment variables for oracle user.

[oracle@demohost ~]$ vim .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/oracle_sw/db_sw
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH
[oracle@demohost ~]$ . ~/.bash_profile

Create a database using the Database Configuration Assistant (DBCA). Lets start listener services before invoking dbca to create database.

[oracle@demohost ~]$ lsnrctl start
[oracle@demohost ~]$ dbca

Select 'Create a database' and click Next.

Give Database Name (For example, DEMODB). And give admin credentials and click Next.

Click Finish.

Click Close to complete database creation process.

Now, we can connect to the database.

[oracle@demohost ~]$ ps -eaf | grep pmon
[oracle@demohost ~]$ export ORACLE_SID=DEMODB
[oracle@demohost ~]$ sqlplus / as sysdba

With this, we have completed Oracle 19c Database Installation on Oracle Linux successfully.

No comments:

Post a Comment