Install oracle 18C redhat centos vmware on laptop SQL DBA 10 steps


Being a database administrator you have asked to take support of other databases as well like Oracle, noSQL, Cloud PaaS and IaaS etc. In Indian service based company, we need attest more than one database knowledge and support experience to lead a database team as well.

I have been working in IT more than 12 years and had supported Oracle not in top level and it was older days and I thought of writing lot once, I have strong working experience, but I did not get much after that. I just started again quarantine time, let us install 18c and do some test ourselves.


Take a reference of old post:

From Oracle 18C onwards oracle made the pre-requesting are very easy, the mandatory one is we need to copy and unzip the database software in the oracle home $ORACLE_HOME.

How to Install Linux on VMware workstation

Install VMware work station

On the OS part — install OS later option– 40 GB disk size VM
–Store virtual machine in single file– Click customize HDD–edit the VM and mount the ISO
Power ON–Skip installation No –Choose custom layout
Create four mandatory file system for Linux oracle
(/ -10 GB, /boot – 500MB, /tmp – 5GB, swap -5 GB & /opt) – Desktop or server class, connect IP automatically etc.

Oracle mount Point

Followings are the task we are going to perform:

  1. Install and build VMware workstation in your laptop
  2. Build new VM by installing CentOS or Linux
  3. Copy the DB software and install DB binaries
  4. Create a oracle database
  5. Create a listener
  6. Connect the database by putty and SQL developer
  7. Configure oracle enterprise manager OEM

Step 1

–Disable firewall and selinux

systemctl status firewalld
service firewalld stop
service firewalld start
systemctl disable firewalld
systemctl enable firewalld

vi /etc/selinux/config

Step 2
–create OS group and user

groupadd -g 1100 oinstall
groupadd -g 1131 dba
groupadd -g 1132 oper
useradd -u 1101 -g oinstall -G dba,oper oracle

passwd oracle

–create directories

mkdir -p /opt/app/oracle/product/18.4.0/dbhome_1
chown -R oracle:oinstall /opt
chmod -R 775 /opt
rm -rf /opt/app/oracle/product/18.4.0/
–change host name

vi /etc/hosts
vi /etc/hostname muthu.localdomain muthu

restart the host

Step 3

We need to run the two RPM – oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm & oracle-database-xe-18c-1.0-1.x86_64.rpm, this will install all the pre-requesting RPMs, you can directly download from internet like what I did (OR) download in your local and transfer by WinSCP.

# curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
# curl -o oracle-database-xe-18c-1.0-1.x86_64.rpm
# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
# yum -y localinstall oracle-database-xe-18c-1.0-1.x86_64.rpm

yum -y install gcc-c++.x86_64 *

yum repolist
yum list


–Install RPM by manual or using YUM, if needed (Not required)

— find the version of OS

cat /etc/redhat-release

— You can do the RPM install by yum or manually from iso/dvd or from internet by redhat
mount /dev/sr0 /mnt
cd /etc/yum.repos.d
–Create a file
vi CentOS7_7.repo

name=CentOS 7.7

yum clean all

Step 4

su – oracle

$ vi .bash_profile

TMP=/tmp; export TMP
ORACLE_HOSTNAME=muthu.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.4.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=testdb; export ORACLE_SID
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH

Step 5
———–Configure VNC
rpm -qa | grep -i vnc

yum install tigervnc-server

vi /etc/sysconfig/vncservers

VNCSERVERS=”2:root” VNCSERVERARGS[2]=”-geometry 1280×1024 -nolisten tcp -localhost”
VNCSERVERS=”1:oracle” VNCSERVERARGS[1]=”-geometry 1280×1024″

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
vi /etc/systemd/system/vncserver@:1.service

–Change the user name two places <USER>

firewall-cmd –permanent –zone=public –add-service vnc-server
firewall-cmd –reload

su – oracle

— To clear the unused entry of vnc
rm -rf /tmp/.X1-lock
rm -rf /tmp/.X11-unix/X2

systemctl daemon-reload
systemctl enable vncserver@:1.service
systemctl stop vncserver@:1.service
systemctl start vncserver@:1.service
systemctl status vncserver@:1.service

–Go to VNC GUI
— now try from vnc client

–find os bit 32 or 64 bit

Step 6

–The binaries must be unziped in oracle home from 18C onwards
copy the software to oracle home

go to ORACLE_HOME directory

and run ./runInstaller

[oracle@localhost dbhome_1]$ ./runInstaller
./runInstaller: line 67: perl/bin/perl cannot execute binary file

software only install
run two scripts as root
/opt/app/oracle/product/18.4.0/dbhome_1/ — enter and enter

Step 7

Run dbca to create database

$ dbca
Type password and SID
Next — next create pluggable if needed.

Step 8

Connect database

[oracle@muthu ~]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release – Production on Thu May 28 04:53:13 2020

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

Connected to:
Oracle Database 18c Enterprise Edition Release – Production

SQL> select name from v$database;



SQL> select name, cdb, con_id from v$database;
SQL> select NAME, OPEN_MODE from v$pdbs;

Step 9

Configure listener and tnsname.ora

$ netca

lsnrctl status

change the hostname
$ hostname
vi $ORACLE_HOME/network/admin/listener.ora

vi $ORACLE_HOME/network/admin/tnsnames.ora

(address = (protocol = TCP)(host = muthu.localdomain)(port = 1521))
(connect_data =

lsnrctl start

[oracle@muthu admin]$ lsnrctl start

LSNRCTL for Linux: Version – Production on 28-MAY-2020 05:12:10

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

TNS-01106: Listener using listener name LISTENER has already been started
[oracle@muthu admin]$ lsnrctl status

LSNRCTL for Linux: Version – Production on 28-MAY-2020 05:12:23

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=muthu.localdomain)(PORT=1521)))

Version TNSLSNR for Linux: Version – Production
Start Date 28-MAY-2020 05:06:49
Uptime 0 days 0 hr. 5 min. 34 sec
Trace Level off
Security ON: Local OS Authentication
Listener Parameter File /opt/app/oracle/product/18.4.0/dbhome_1/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/muthu/listener/alert/log.xml
Listening Endpoints Summary…
The listener supports no services
The command completed successfully
[oracle@muthu admin]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release – Production on Thu May 28 05:13:05 2020

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

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 1962931152 bytes
Fixed Size 8897488 bytes
Variable Size 1224736768 bytes
Database Buffers 721420288 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.

Step 10

Enable oracle enterprise manager

select NAME, OPEN_MODE from v$pdbs;
alter session set container=PDB01;

firewall-cmd –add-port=5500/tcp

Happy learning!

How to connect Oracle database in real time:

You will have a domain account and you need to sudo with oracle.

Example: Server name is SVR_ORA_DB01

  1. Connect by putty SVR_ORA_DB01 (Enter domain credential)
  2. Sudo su – oracle
  3. ps -ef|grep pmon
  4. sqlplus “/as sysdba”

You can find sid and DBname in cat /etc/oratab. You can change or switch to connect different databases by . oraenv

Ex: . oraenv (Type the Db name and enter)

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 46 = 48

hacklink panel hacklink al hacklink sollet hdxvipizle resim yükleme onwin venüsbet ai nude 1xbet güncel giriş eskort yeşilköy cami avizesi seo paneli soma kömür bahis forum backlink al pgslot สล็อตเวตรง holiganbetvds
hack forum hacklink panel hacklink hacklink cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami avizesi cami avizesi cami süpürgesi cami süpürgesi cami ısıtma cami ısıtma evden eve nakliyat ofis taşıma seo hizmeti Onwin Rulet Casino Slot Oyna Bahigo 1xbet Deneme bonusu Bahis siteleri Maç özetleri Bahsegel Canlı Casino Siteleri Sweet Bonanza Blackjack Casino Rulet Oyna Canlı Casino takipçi satın al smm panel m