1585 2ngart2s Instaling and Creating an Orace Database 18c on Linx7.8
Home » Database » Installing and Creating an Oracle Database 19¢ on
Linux 7.8
Installing and Creating an Oracle Database
19c on Linux 7.8
Published on: April 7, 2021 by Ravindra Kumar
Oracle database is one the widely used RDMBS system. In this tutorial, you will
install and create an Oracle database 19c on Linux 7 on a virtual machine. It will be
a CDB database, without Oracle Restart services.
In high level, you will perform the following:
Change the Settings of the Appliance srv1
Make the machine IP address static
Configure Putty to connect to srvi
Set up the environment variables for the OS account oracle
Change the kernel parameter values to the recommended values
Install more packages
Install Oracle database software and create the sample database
Required Resources
* Amachine with a free 8GB in its memory. This means the RAM memory in
your PC should be at least 12GB.
* Atleast 30GB free disk space.
* Good Internet Connection
Edit the /ete/hosts file and add the hostname and the IP address to it.
# vi /etc/hosts
192.168.1.127 srvi.localdomain srv1
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8 ne= ts onars Instango reaing n Oral Database 10n in 7.8
Database Specifications
The tutorial aims at creating a database with the following high level specifications:
SID oradb
Home /uo1/app/oracle/product/19.0.0/db_1
Release 19¢
Version 19.3
CDB/non-CDB CDB
os Linux 7.8
Hostname srv1
Storage Option file system
Required Software and Packages
Oracle Database 19¢ installation files for Linux x86-64. This can be downloaded
from Oracle site.
Note: download the zip file, not the rpm file.
Putty: which is a utility that provides a command line prompt to connect to a Linux
server from Windows.
Setting up Environment Variables for the Software
Owner Account
In the following steps, you will configure the OS variables for the software owner
account (oracle).
In the Putty session, make sure the current user is root then add oracle account to
vboxsf group.
‘The vboxsf group was created by VirtualBox Guest Additions and it allows its
members to access the shared folder (staging folder) in the hosting machine. In a
production real life machine, you may not need to implement this step.
hitpetnecodectoudivnstaling-and-creting-an-oracte-detabase-196-on nu 7-8) ane1585 2ngart2s Instaling and Creating an Orace Database 18c on Linx7.8
# usermod -a -G vboxsf oracle
Switch the current user to oracle and make a backup copy of its bash profile file:
# su - oracle
# my ~/.bash_profile ~/.bash_profile_bkp
Open the .bash_profile file with the vi editor
vi~/.bash_profile
Add the following to it.
# bash_profile
if [-f ~/bashre ]; then
.~/.bashre
fi
ORACLE_BASE=/uo1/app/oracle; export ORACLE_BASE
ORACLE_SID=oradb; export ORACLE_SID
ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1; export ORACLE_H
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_F(
‘TNS_ADMIN=$ORACLE_HOME/network/admin; export INS_ADMIN
PATH=$PATH:$HOME/local/bin:$HOME/bin
PATH=${PATH}: /ust/bin:/bin:/usr/local/bin
PATH=.:${PATH}:$ORACLE_HOME/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH ib:/usr/lib: /usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8 anewn 1 azar2s Instaling and Creating an Oraco Database 19¢ on Lru7.8
As root, run the following code to create the groups and directories required by
Oracle software.
#su—
# groupadd oinstall
# usermod- oinstall oracle
# mkdir -p /u01/app/oracle/product/19.0.0/db_1
# mkdir -p /uo1/app/oralnventory
# chown -R oracle:oinstall /uo1/app/oracle
# chown -R oracle:oinstall /uo1/app/oralnventory
Changing Kernel Parameter Values
In the following step, you will change the kernel parameter values to the values
recommended by Oracle.
Make sure the current user is root
Create the following file then add the code that follows to it.
# vi /ete/sysctl.d/97-oracle-database-sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
Change the current values of the kernel parameters:
# /sbin/sysctl—-system
Next Reboot srv1
# shutdown -r now
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8 ana1585 2ngart2s Irstaling and Creating an Oraco Database 19¢ on Linwx7.8
Install More Packages
In the following steps, you will install further packages in srv1 that are required by
Oracle database software.
Open Putty and login to srvi as root
Run the following code to install further packages required by Oracle software.
# yum install ksh
# yum install libaio-devel.x86_64
Installing Oracle Database Software and Creating
the Database
In the following steps, you will install Oracle database software in srv1 and create
the database.
Copy the Oracle database software installation file to the staging folder.
At the time of this writing, the installation file name downloaded from Oracle site is
LINUX.X64_193000_db_home.zip
In the Putty session, change the current user to oracle then extract the installation
file into the Oracle database software home directory
# su - oracle
# unzip /media/sf_staging/LINUX.X64_193000_db_home.zip -d $ORACLE_H
In the linux machine login as oracle user and open a terminal window, change the
current directory to the Oracle database home directory and run the gridSetup.sh
script.
# cd $ORACLE_HOME
# /runinstaller
Next respond to the Installer windows as follows:
Window Action
hitpetnecodectoudivnstaling-and-creting-an-oracte-detabase- 196-0 nu 7-8) sna185 2naart2s
Configuration
Option
System Class
Database
Edition
Installation
Location
Create
Inventory
Configuration
Type
Database
Identifiers
Configuration
Options
Database
Storage
Management
Options
Recovery
Option
Schema
Password.
Irstaling and Creating an Oracle Database 19¢ on Linwx7.8
Select the following option:
“Create and Configure a single instance database.”
Select the following option: “Server Class”
Select the following option:
“Enterprise Edition”
Keep the default values
oralnventory Group Name: oracle
Select the following option:
General Purpose
Global Database Name: oradb.localdomain
Oracle SID: oradb
Pluggable Database Name: pdb1
Do not mark the AMM checkbox
Memory: 5120 MB
Character set: Use Unicode (AL32UTF8)
Sample Schemas: (optional) Mark the checkbox “Install
sample schema in the database”
Make sure “File System” option is selected
Make sure the checkbox is not marked.
Mark the checkbox Enable Recovery
Make sure “File system” option is selected
Set passwords for the accounts
hitpetnecodectoudivnstaling-and-creating-an-oracte- database 196-on nu 7-8) ana185 2naart2s Instaling and Creating an Oracle Database 18c on Linx7.8
Operating Select the “oinstall” group for all the options, except the
System OSOPER keep it blank.
Groups
Root Script Mark the checkbox “Automatically run configuration scripts”
Execution and enter the root password
All the Prerequisite Checks should pass.
Summary Click on Install button
Install When the installation reaches to nearly 12%, if will display a
Product confirmation message. Click on Yes button.
Finish dick on Close button
After the installation and database creation are finished, verify the database is up
and running by logging to it as sysdba
# sqlplus / as sysdba
Check if a connection entry to oradb is added to the tnsnames.ora file. The
tnsnames.ora file was created.
# cat STNS_ADMIN/tnsnames.ora
In the VirtualBox window of srvi, start the Firefox browser and open the EM
Express using the following URL. Accept the warning displayed by the browser.
Enter the sys username, its password, leave the container name blank then click
on Login button.
https://srv1:5500/em
Note: You may consider creating and deploying a script that automatically starts up
the database when the machine is rebooted. The steps to perform this task are as
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8 ma1585 2ngart2s Instaling and Creating an Orace Database 18c on Linx7.8
follows
Open Putty and login as root to srv1. Edit the oratab file
# vi /etc/oratab
Change the last field for the database line to Y
oradb:/uo1/app/oracle/product/19.0.0/db_1:Y
Create the file /etc/init.d/dbora and add the following code in it:
+
vi /ete/init.d/dbora
#! /bin/sh
# description: Oracle auto start-stop script.
ORA_HOME=/u01/app/oracle/product/19.0.0/db_1
ORA_OWNER-=oracle
case "$1" in
'start')
# Start the Oracle databases:
# Remove "&" if you don't want startup as a background process.
su - $ORA_OWNER -c "S$ORA_HOME/bin/dbstart $ORA_HOME" &
touch /var/lock/subsys/dbora
‘stop)
# Stop the Oracle databases:
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME" &
1m -f /var/lock/subsys/dbora
esac
Change the group of the dbora file to oinstall, and set its permissions to 750.
# chgrp oinstall /etc/init.d/dbora
# chmod 750 /etc/init.d/dbora
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8 wawn 1 azar2s Instaling and Creating an Oraco Database 19¢ on Lru7.8
6. Create symbolic links to the dbora script in the appropriate run-level script
directories
In-s /ete/init.d/dbora /ete/re.d/re0.d/Ko1dbora
In-s /ete/init.d/dbora /ete/re.d/rc3.d/Sgdbora
In-s /ete/init.d/dbora /ete/re.d/re5.d/Sggdbora
Restart srvi and wait for a few minutes to allow the database to automatically start
up. Login as oracle to srv1 and verify that the database has automatically started.
# ps-ef | grep pmon
# sqlplus /as sysdba
Conclusion
Hence we successfully installed and configured an Oracle Database 19c on Linux
7.8. Ifyou got any query please do write comment.
Read More : How to Setup Master-Slave Replication in MySQL 8 on.
Ubuntu 20.04
al Post Views:
Ravindra Kumar
Hi, This is Ravindra. I am founder of TheCodeCloud. I am AWS Certified
Solutions Architect Associate & Certified in Oracle Cloud as well. 1am
DevOps and Data Science Enthusiast.
hipsthecodecloudivnstaling-and-creating-an-oracte- database 86-07 Inu 7-8foo 155 20207125 Instaling and Creating an Oracle Database 19¢ on Linux7.8
Recommended Reading..
How to Build Nginx from Source on Ubuntu 20.04 and
Centos 8.0
AWS Certified Solutions Architect Associate Practice —
Quiz 4
How to create a systemd service unit for Shell Scripts in
Linux
Leave a Comment
‘Name *
Email *
‘nips sMhecodecloud ininstaling-ant-creaing-2n-oracie- database 180-0 tn. 7-81
seoo 155 2020725 Instaling and Creating an Oracle Database 19¢ on Linux7.8
O Save my name, email, and website in this browser for the next time I comment.
Post Comment
Connect with Us
@0008
Featured Articles
How to Install and Configure Ansible on Amazon Linux 2 on AWS
Top 20 Linux Find Command Practical Examples
How to Install and Configure Kubernetes Cluster (k8s) on CentOS
8/RHEL 8
inux Troubleshooting — Why Is the Server So Slow? (Running Out
of CPU, RAM, and Disk I/O)
How to configure Networking and Port Mapping in Docker
How to Install Python 3.8 on RHEL/CentOS 7
How to Setup Master-Slave Replication in MySQL 8 on Ubuntu
20.04
Top 25 AWS Cloud Admin Interview Questions and Answers
Troubleshoot with Top Command in Linux with Examples
Top 20 Linux Interview Questions For Experienced SysAdmins
Interview Questions
Top 10 Shell Scripting Interview Questions with Answers
Top 20 Linux Interview Questions for Freshers
Top 20 Linux Interview Questions For Experienced SysAdmins
Top 20 DevOps Interview Questions with Answers
Top 25 AWS Cloud Admin Interview Questions and Answers
‘nips sMhecodecloud ininstaling-ant-creaing-2n-oracie- database 180-0 tn. 7-81 wwewn 1 azar2s Instaling and Creating an Oraco Database 19¢ on Lru7.8
DevOps
An overview of Git
An Advanced Overview of Docker
Docker Basic Commands
An Advanced Overview of Ansible
Practical Git Commands
Advanced Overview of K8s (Kubernetes )
Troubleshoot with Top Command in Linux
Linux Security
How to Configure Firewall with UFW on Ubuntu
Iptables Tutorial: Beginners to Advanced Guide To Linux Firewall
Firewalld Tutorial: Beginners to Advanced Guide To Linux Firewall
Generate a SELF-SIGNED SSL Certificate with Openssl in Linux
Install FREE SSL/TLS Certificate on Apache with Let’s Encrypt on
Ubuntu
hipsthecodecloudivnstaling-and-creating-an-oracte- database 96-1 Ine 7-8