oracledba.help
Install

Oracle 19c Database Product Installation

Overview

What follows is the most common way to install the Oracle 19c database product on Linux for enterprise environments. With 18c and later you simply unzip the corresponding .zip file and run a process that registers Oracle as shown below (AKA image-based installation).

Prerequisites

  • RAM 8gb or better.
  • Production disk performance: 1ms read and 5ms average write times or better.
  • OS LINUX 7 or 8 (OEL highly recommended).
  • Network infrastructure readied:
    • DNS resolving system name OK.
    • If firewall used then the Oracle listener port opened (ex: 1521).
  • Download files to your local disk.
  • Perform the OS Prerequisites.
  • If this will be a RAC you must first install the Grid Infrastructure (GI) ensure that ASM and all connectivity for cluster is OK.
  • Create the new Oracle home and extract the image file into the newly-created Oracle home.
 su -
 mkdir -p /u01/app/oracle/product/19.3.0.0.0/dbhome_1
 cp LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.3.0.0.0/dbhome_1/
 chown -R oracle:oinstall /u01/app/oracle
 chmod -R 775 /u01/app/oracle/product/19.3.0.0.0/dbhome_1

 su - oracle
 cd /u01/app/oracle/product/19.3.0.0.0/dbhome_1/
 unzip LINUX.X64_193000_db_home.zip 

Single Database Installation

If GI\ASM not used init oraInventory Directory:

 su -
 mkdir -p /u01/app/oraInventory
 chown oracle:oinstall /u01/app/oraInventory
 chmod -R 775 /u01/app/oraInventory

Log into GUI as the oracle user, run the Installer:

 If Linux 8 run:
   export SRVM_DISABLE_MTTRANS=true
   export CV_ASSUME_DISTID=OEL7.8
 cd /u01/app/oracle/product/19.3.0.0.0/dbhome_1/
 ./runInstaller &

Configuration Option

 🖸 Set Up Software Only

Database Installation Option

 🖸 Single instance database installation

Database Edition

 🖸 Enterprise Edition

Installation Location

 Oracle base: /u01/app/oracle

Create Inventory

 Inventory Directory: /u01/app/oraInventory
 oraInventory Group Name: oinstall

Operating System Groups

 Set all to: dba
 If fine granted security required accept defaults.

Root script execution

 ☐ Automatically run configuration scripts
 Disabling this makes it easier to debug.

Prerequisite Checks

 Adjust as required.

Summary

 Select  Install 
 Product installation runs...

 You will be prompted to run some scripts as root during the install.
 /u01/app/oraInventory/orainstRoot.sh
 /u01/app/oracle/product/19.3.0.0.0/dbhome_1/root.sh

 If successful you will see: 
 The registration of Oracle Database was successful.
 Select:  Close 

RAC Database Installation

  • Check the status of the cluster and ensure everything looks good before proceeding.
  • Install from node 1. The install process will install files on other node(s) you specify.
  • Minimal remote node dir prep.
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
Perform on all remote nodes.

Run Installer as the oracle user.

 If Linux 8 run:
   export SRVM_DISABLE_MTTRANS=true
   export CV_ASSUME_DISTID=OEL7.8
 cd /u01/app/oracle/product/19.3.0.0.0/dbhome_1/
 ./runInstaller &

Configuration Option

 🖸 Set Up Software Only

Database Installation Options

 🖸 Oracle Real Application Clusters database installation

Nodes Selection
If adding a new node just select the node you are adding otherwise select all nodes.

 Example:
 ⮽ lnx01
 ⮽ lnx02
 a. Select  SSH Connectivity 
 b. OS Username: oracle  
    OS Password: <Enter the oracle user password>
 c. Select  Setup 
    You should receive message that SSH connectivity was successful.
    Selecting  Test  should also show this.

 When Next selected checks will run to ensure installation can be 
 perform on all nodes.

Database Edition

 🖸 Enterprise Edition

Installation Location

 Oracle base:         /u01/app/oracle
 Software location:   /u01/app/oracle/product/19.3.0.0.0/dbhome_1/

 After pressing  Next  remote system checks are performed.

Operating System Groups

 Set all to: dba

If your environment requires fine grained security use the defaults.

Root script execution

  ☐ Automatically run configuration scripts
  Disabling this makes it easier to debug.

Prerequisites Check

 Change anything specified before continuing.

Summary

 After reviewing select:  Install 

Install Product

 Product installation runs...

 At the "Copy Files to Remote Nodes" step, on the other node(s) 
 you will see "ractrans" services running correspondingly.

 You will be prompted to run script as root during the install on all nodes.
 Example: /u01/app/oracle/product/19.3.0.0.0/dbhome_1/root.sh
  • Example Log monitoring: tail -f /u01/app/oraInventory/logs/installActions2017-11-13_12-38-12PM.log
  • If install gets stuck when checking resolv.conf try this.

Finish

 If successful you will see: 
    The installation of Oracle Database was successful.
    Select:  Close 

Post Installation Actions

Create Initial oracle BASH User Profile (.bashrc)

The database name used here is oradb. Change as required for your environment.

umask 022

# Global Definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
      ulimit -p 16384
      ulimit -n 65536
   else
      ulimit -u 16384 -n 65536
   fi
fi

# Environment Vars
#After database created.#
#Std=DBName   # export ORACLE_SID=oradb
#RAC=InstName # export ORACLE_SID=oradb1

export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=/u01/app/oracle/product/19.3.0.0.0/dbhome_1;
export ORACLE_TERM=xterm;
export PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/local/bin:.local/bin:$HOME/bin

export TEMP=/tmp
export TMPDIR=/tmp

# Aliases - Common
alias cl='clear;crontab -l'
alias l9='ls -alt | head -9' 
alias l20='ls -alt | head -20'
alias l50='ls -alt | head -50'
alias oslog='tail -f /var/log/messages'
alias tf='date;ls -l|wc -l'

# cron
OUT=/u01/app/scripts/out
SCRIPTS=/u01/app/scripts

# DBA Aliases
ORACLE_DB=oradb
alias cdbin='cd $ORACLE_HOME/bin;pwd'
alias cdtrace='cd $ORACLE_BASE/diag/rdbms/$ORACLE_DB\/$ORACLE_SID\/trace;pwd'
alias cdnet='cd $ORACLE_HOME/network/admin;pwd'

alias alog='tail -f $ORACLE_BASE/diag/rdbms/$ORACLE_DB\/$ORACLE_SID\/trace/alert_$ORACLE_SID\.log'
alias llog='tail -f $ORACLE_BASE/diag/tnslsnr/$HOSTNAME/listener/alert/log.xml'
alias clog='tail -f /u01/app/grid/diag/crs/$HOSTNAME/crs/trace/alert.log'

alias bkp='cd /u02/rman;pwd'
alias dbf='cd /u02/data/XXX/datafile;pwd'
alias dbs='srvctl status database -d $ORACLE_DB'
alias dev='cd /u01/app/scripts;pwd'
alias dmp='cd /u05/exports/$ORACLE_DB; pwd'
alias sqp='rlwrap sqlplus / as sysdba'
alias sqpl='rlwrap sqlplus sys/go@oradb as sysdba'
alias sqldev='cd $ORACLE_HOME/sqldeveloper/sqldeveloper/bin;./sqldeveloper &'
alias rmn='rlwrap $ORACLE_HOME/bin/rman target / nocatalog'
alias src='source $HOME/.bashrc'

# Data Guard
alias dglog='tail -f $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/drc$ORACLE_SID.log'
alias dgloge='vi $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/drc$ORACLE_SID.log &'

For oslog: chmod 644 /var/log/messages
For dev: mkdir /u01/app/scripts; chown oracle:oinstall /u01/app/scripts; chmod -R 775 /u01/app/scripts

rlwrap

 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
 yum install rlwrap -y

SQLPATH, Add Your Scripts Dir to Env and Registry

This action is for windows environments only.

Set Windows Environment Variable:

 1. Windows-Key
 2. Type: env
 3. Select: Edit the system environment variables.
 4. Select: [Environment Variables]
 5. Set SQLPATH as so:
    SQLPATH=H:\app\sql;C:\app\sql;

Using regedit, make registry entry:

 Navigate to Oracle:  HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient19Home1
 Set value for entry: SQLPATH
 Example value:       C:\app\scripts\sql;C:\app\oracle\client\product\19.0.0\client_1\dbs

SQLPlus, Set Global Profile Settings

vi $ORACLE_HOME/sqlplus/admin/glogin.sql to set common values.

SET LINESIZE 240
SET PAGESIZE 9999
SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER> "

TFA Info

Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
 /u01/app/oracle/product/19.3.0.0.0/dbhome_1/bin/tfactl

 Note:
 1. tfactl will use TFA Service if that service is running and user has been granted access
 2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or 
    TFA is not installed

VMware\VirtualBox /etc/resolv.conf Issue Workaround

chattr -i /etc/resolv.conf
mv /etc/resolv.conf /etc/resolv.conf.old

<<Perform Install>>

mv /etc/resolv.conf.old /etc/resolv.conf
chattr +i /etc/resolv.conf