The notebook / Oracle Database
Oracle Database
OracleSTEP-BY-STEP GUIDE

Oracle Database 19c on VMWare Workstation PRO

A complete walkthrough for installing Oracle Database 19c on Oracle Linux 7 with VMware Workstation Pro.

This article describes the installation of Oracle Database 19c Standalone on Linux (Oracle Linux 7 64-bit) using VMWare Workstation Pro.

  1. Introduction

  2. Software Downloads

  3. Machine Setup

  4. Oracle Software Installation

  5. Database Creation

  6. Listener configuration

  7. Final health check

Introduction:

We are going to see how to install and configure Oracle 19c (19.3 64 bit) Standalone on Linux (Oracle Linux 7 64-bit). Since this is a standalone system, I have kept file system and all relevant dependencies as simple as it can be. I am using VMWare Workstation PRO 16. If you are seeking to have a free software, go with Workstation Player (It has its own limitations) or off course VirtualBox is always there to save us.

What are Prereqs to setup 19c Database Standalone server? 

- 8GB RAM for VM

- Minimum 50GB disk space

- Required Softwares

Software Downloads: 

Download the following software.

Let’s skip the VMWare installation as it’s a straightforward method to get installed on Windows. Remember, while you install it adds a network adapter and it’s suggested to reboot your system ones.

Machine Setup:

Open VMWare Workstation Pro and click on “Create new Virtual Machine”

Choose Custom configuration and click “Next”. Follow the screenshots and its values as mentioned. 

Picture1.png Picture2.png Picture3.png Picture4.png Picture5.png Picture6.png Picture7.png Picture8.png Picture9.png Picture10.png Picture11.png Picture12.png Picture13.png Picture14.png

Once clicked “Finish”, the VM will try to boot and you should see below screen for initial boot config. 

Linux Installation:

Picture17.png Picture18.png Picture19.png Picture20.png Picture21.png

I am keeping 2 Ethernet adapters just to allign communication with other VMs from VirtualBox. So kindly ignore other one. 

Give a Hostname that suites best to you. This may be useful for us to configure an application from our host machine. 

Picture22.png

Set the root password and click “Done”.

Picture26.png

Create 1 user like “admin” that is other than root for initial login. 

Picture27.png Picture28.png

Click on “Reboot” once the installation is done. 

Picture29.png

Accept the license terms. 

Picture30.png Picture31.png

Click on “Finish Configuration”. 

Shutdown the server to create a shared folder between host system and VM Guest OS.

$ init 0

Click on “Add” > “Next”. Mention the path from Host machine and give it a name. 

shared_folder.png shared_folder1.png

Oracle Software Installation:

Start the VM. 

From here, we’ll start using Putty. That makes our setup procedure much easy. I am using “MobaXterm”. This will support all extentions like SFTP, Xserver which are necessary for our installations. 

[admin@ora19csa ~]$ su -

Password:

Last login: Sat Jul 31 01:25:31 EDT 2021 on pts/1

[root@ora19csa ~]#

[root@ora19csa ~]#
[admin@ora19csa ~]$ curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 18204  100 18204    0     0  35649      0 --:--:-- --:--:-- --:--:-- 35694
yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

Running transaction
  Installing : ksh-20120801-142.0.1.el7.x86_64                                                                                                                                                            1/3
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                                                         2/3
  Installing : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                                                            3/3
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                                                         1/3
  Verifying  : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                                                            2/3
  Verifying  : ksh-20120801-142.0.1.el7.x86_64                                                                                                                                                            3/3

Installed:
  oracle-database-preinstall-19c.x86_64 0:1.0-1.el7
 

yum install ntp -y

yum update -y
systemctl disable avahi-daemon

systemctl stop avahi-daemon

passwd oracle

Create necessary directories where software will be installed. 

mkdir -p /app/oracle/product/19.0.0.0/dbhome1
mkdir -p /app/oraInventory
mkdir -p /app/oracle/oradata
mkdir -p /app/oracle/recovery_area

chown -R oracle:oinstall /app/

chmod -R 775 /app/

Setting the bash profile. 

[oracle@ora19csa ~]$ vi .bash_profile

# Oracle Settings

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=ora19csa.dbgenre

export ORACLE_UNQNAME=ORCLSA1

export ORACLE_BASE=/app/oracle

export DB_HOME=$ORACLE_BASE/product/19.0.0.0/dbhome1

export ORACLE_HOME=$DB_HOME

export ORACLE_SID=orclsa

export ORACLE_TERM=xterm

export BASE_PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$BASE_PATH:$ORACLE_HOME/OPatch

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias oh='cd $ORACLE_BASE/product/19.0.0.0/dbhome1'

alias na='cd $GRID_HOME/network/admin'

alias db='sqlplus / as sysdba'

Run the below command to mount the Shared folder so we dont have to perform sftp all the time to bring the binaries, rather we could directly inflate it from dbhome folder. 

vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
[root@ora19csa ~]# df -h

Filesystem           Size  Used Avail Use% Mounted on

devtmpfs             3.8G     0  3.8G   0% /dev

tmpfs                3.8G     0  3.8G   0% /dev/shm

tmpfs                3.8G  9.5M  3.8G   1% /run

tmpfs                3.8G     0  3.8G   0% /sys/fs/cgroup

/dev/mapper/ol-root   44G   13G   32G  28% /

/dev/sda1           1014M  341M  674M  34% /boot

tmpfs                771M   12K  771M   1% /run/user/42

tmpfs                771M     0  771M   0% /run/user/1000

vmhgfs-fuse          667G   45G  623G   7% /mnt/hgfs

Extracting the software binary and installing 19c software. 

I always prefer to keep my software installation, database creation and listener installation seperately though Oracle gives us a feature to club them all togather. This is to reduce my point of failures to the whole of installation. 

[oracle@ora19csa dbhome1]$ cd /app/oracle/product/19.0.0.0/dbhome1

[oracle@ora19csa dbhome1]$ unzip /mnt/hgfs/dbgenre/Installs/Binaries/LINUX.X64_193000_db_home.zip

Above command inflates the software binary and keeps in the dbhome1 directory. 

Setup Sudo as root: 

[admin@ora19csa ~]$ su -
Password:
Last login: Sat Jul 31 01:25:31 EDT 2021 on pts/1
[root@ora19csa ~]# vi /etc/sudoers
oracle       ALL=(ALL)      ALL

Picture1.png Picture2.png Picture3.png Picture4.png Picture5.png Picture6.png Picture7.png Picture8.png Picture9.png Picture10.png

With this, Software installation is done. 

Database Creation:

Once finishing the software installation, lets create a database using “dbca”. 

[oracle@ora19csa dbhome1]$ dbca

Picture11.png Picture12.png Picture13.png Picture14.png Picture15.png Picture16.png Picture17.png Picture18.png Picture19.png Picture20.png Picture21.png Picture22.png Picture23.png Picture24.png Picture25.png Picture26.png Picture27.png

With this Database creation is done. 

Listener configuration:

Now lets configure the Listener for our Database. 

[oracle@ora19csa dbhome1]$ netca

Picture28.png Picture29.png Picture30.png Picture31.png Picture32.png Picture33.png Picture34.png Picture35.png

By clicking “Finish”, we conclude LISTENER configuration and now we should be good to perform our health check. 

Final checks:

Lets do a final health check, concluding we have done all required installation steps. 

[oracle@ora19csa dbhome1]$ db

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 31 23:52:35 2021
Version 19.3.0.0.0

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

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

SQL> select name, open_mode,database_role from gv$database;

NAME      OPEN_MODE            DATABASE_ROLE
-–––– –––––––––– ––––––––
ORCLSA    READ WRITE           PRIMARY

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
-——— —————————— ––––– –––––
        2 PDB$SEED                       READ ONLY  NO
        3 PDB1                           READ WRITE NO

[oracle@ora19csa dbhome1]$ ps -ef|grep lsnr

oracle   16644     1  0 23:33 ?        00:00:00 /app/oracle/product/19.0.0.0/dbhome1/bin/tnslsnr LISTENER -inherit

oracle   16922  8571  0 23:34 pts/2    00:00:00 grep --color=auto lsnr

[oracle@ora19csa dbhome1]$

[oracle@ora19csa dbhome1]$ lsnrctl stat

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 31-JUL-2021 23:34:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora19csa.dbgenre)(PORT=1521)))
STATUS of the LISTENER
-———————–
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                31-JUL-2021 23:33:53
Uptime                    0 days 0 hr. 0 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /app/oracle/product/19.0.0.0/dbhome1/network/admin/listener.ora
Listener Log File         /app/oracle/diag/tnslsnr/ora19csa/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19csa.dbgenre)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary…
Service “86b637b62fdf7a65e053f706e80a27ca” has 1 instance(s).
Instance “orclsa”, status READY, has 1 handler(s) for this service…
Service “c878064cff51345ce055020c299d225d” has 1 instance(s).
Instance “orclsa”, status READY, has 1 handler(s) for this service…
Service “orclsa” has 1 instance(s).
Instance “orclsa”, status READY, has 1 handler(s) for this service…
Service “orclsaXDB” has 1 instance(s).
Instance “orclsa”, status READY, has 1 handler(s) for this service…
Service “pdb1” has 1 instance(s).
Instance “orclsa”, status READY, has 1 handler(s) for this service…
The command completed successfully
[oracle@ora19csa dbhome1]$

With this we conclude our article here upon successfully completing our Oracle Database 19c Installation on VMWare Workstation PRO. As mentioned earlier, if you wish to perform the same in VirtualBox, pls do so. Steps and concepts are quite similar except the initial VM configuration. 

Hope this helps. 

Regards,

Balaaji Dhananjayan