Installation Overview
Oracle 19c (19.3) is the long-term support (LTS) release recommended for production. We'll install it on Oracle Linux 8 / RHEL 8 — the preferred platform for Oracle Database.
Prerequisites
Hardware Requirements (Minimum for Lab)
- RAM: 2 GB minimum (8 GB recommended)
- Disk: 10 GB for software + 5 GB for database files
- CPU: x86-64 architecture
OS Prerequisites
# Install prerequisite packages (Oracle Linux / RHEL)
dnf install -y oracle-database-preinstall-19c
# Or manually for CentOS/RHEL
dnf install -y bc binutils elfutils-libelf elfutils-libelf-devel
fontconfig-devel glibc glibc-devel ksh libaio libaio-devel
libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb
make net-tools nfs-utils python python-configshell smartmontools
sysstat targetcli unixODBC
Create Oracle OS User and Groups
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle
# Create directory structure
mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Set Kernel Parameters (/etc/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
# Apply kernel parameters
sysctl -p
Oracle Environment Variables
# Add to ~oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
export ORACLE_SID=ORCL
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
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
Silent Installation
# Unzip the installer
cd /u01/app/oracle/product/19.3.0/dbhome_1
unzip /tmp/LINUX.X64_193000_db_home.zip
# Run silent install
./runInstaller -silent -responseFile /tmp/db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=myserver.example.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
DECLINE_SECURITY_UPDATES=true
# Run root scripts when prompted
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Create Database Using DBCA
# GUI mode
dbca
# Silent mode
dbca -silent -createDatabase
-templateName General_Purpose.dbc
-gdbName ORCL
-sid ORCL
-responseFile NO_VALUE
-characterSet AL32UTF8
-sysPassword Oracle19c#
-systemPassword Oracle19c#
-createAsContainerDatabase true
-numberOfPDBs 1
-pdbName ORCLPDB
-pdbAdminPassword Oracle19c#
-databaseType MULTIPURPOSE
-memoryMgmtType AUTO_SGA
-totalMemory 2048
-storageType FS
-datafileDestination /u01/app/oracle/oradata
-redoLogFileSize 200
-emConfiguration NONE
-ignorePreReqs
Configure the Listener
# $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.example.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
# Start listener
lsnrctl start
# Check status
lsnrctl status
Configure tnsnames.ora
# $ORACLE_HOME/network/admin/tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.example.com)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ORCL))
)
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.example.com)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ORCLPDB))
)
Lab 2: First Connections
# Connect locally as SYSDBA
sqlplus / as sysdba
# Connect via listener
sqlplus sys/Oracle19c#@ORCL as sysdba
sqlplus system/Oracle19c#@ORCLPDB
-- Check status after startup
SQL> SELECT name, open_mode FROM v$pdbs;
SQL> ALTER PLUGGABLE DATABASE ORCLPDB OPEN;
-- Auto-open PDB on startup
SQL> ALTER PLUGGABLE DATABASE ORCLPDB SAVE STATE;
Common Installation Errors
INS-13001: Environment does not meet minimum requirements
# Solution: Run prerequisite package
dnf install -y oracle-database-preinstall-19c
# Then re-run installer with -ignorePrereq if in lab
ORA-12541: TNS: no listener
# Check listener is running
lsnrctl status
# Start if stopped
lsnrctl start
Summary
- Install OS prerequisites and create oracle OS user before installing
- Set ORACLE_HOME, ORACLE_BASE, ORACLE_SID in .bash_profile
- Use DBCA to create CDB with PDB — standard for 12c+
- Configure listener.ora and tnsnames.ora for network connectivity
Next: Part 3 – SQL Fundamentals: DDL & DML
Comments (0)
Please sign in to leave a comment.
No comments yet. Be the first to share your thoughts!