oracledba.help works great on your mobile device too!

oracledba.help

Oracle 12c Database Installation: Linux

<- Install

Overview

What follows is the most common way to install the Oracle 12c (12.2.0.1) database product on Linux enterprise environments. Ideally you only want to install what will actually be used. This streamlines routine Oracle patches and makes your databases more secure. Removing unused components at a later date usually requires running scripts, various manual actions and downtime.

Change system and instance name(s) as required for your environment.

TOC

Prerequisites

  • LINUX running 3.8.x.el7uek.x86_64 or later.
  • System minimums: 4gb RAM, 10gb Disk, 64-bit supported OS.
  • Oracle requires 1ms read and 5ms average write times or better.
  • Network infrastructure readied:
    • Firewall configured (ex: port 1521 opened).
    • DNS resolving system name.
  • Download files to your local disk.
  • Perform the OS Prerequisites.
  • If this will be a RAC you must first install the Grid Infrastructure (GI) and ensure that ASM and all connectivity for cluster is OK.

Single Database Installation

If creating a files based database (no ASM) initialize the Oracle Inventory directory.

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

Run the Installer as the oracle user:

 su - oracle
 cd /u01/orasw/database 
 ./runInstaller & 

Configure Security Updates

 • Set Oracle support connection parameters.
   Email: {DBA Email Address}
 • If behind a secure network blocked to the Internet:
   [ ] I wish to receive security updates via My Oracle Support
   

Installation Option

 (x) Install database software only

Installation Options

 (x) Single instance database installation

 If prompted, Product Languages:
 Selected Languages: {English} (use default)

Database Edition

 (x) Enterprise Edition

Installation Location

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

Create Inventory (if not already created)

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

Privileged OS Groups (use defaults)

 Note: Some prefer to set them all to: dba

Prerequisites Check

 Change anything specified before continuing.

Summary

 After reviewing select: 
 Product installation runs...

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

 The 2nd script will be prompt to install Trace File Analyzer (TFA): yes

Finish

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

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.

Run Installer as the oracle user.

 cd /u01/orasw/database 
 ./runInstaller &

Configure Security Updates

 - Set Oracle support connection parameters.
   Email: {DBA Email Address}
 - If behind a secure network blocked to the Internet:
   [ ] I wish to receive security updates via My Oracle Support
   

Installation Option

 (x) Install database software only

Database Installation Options

 (x) Oracle Real Application Clusters database installation

     If database will be a RAC the GI should already be 
     installed and this option should be selected.

Nodes Selection

 Example:
 [x] lnx01
 [x] lnx02

 If adding a new node just select the node you are adding.

  a. Select 
  b. OS Username: oracle  
     OS Password: <Enter the oracle user password>
  c. Select 
     You should receive message that SSH connectivity was successful.
     Selecting  should also show this.
  When Next selected checks will run to ensure installation can be 
  perform on all nodes.

Product Languages

 Selected Languages: {English} (use default)

Database Edition

 (x) Enterprise Edition

Installation Location

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

 Some remote checks are performed...after pressing 

Operating System Groups

 Set all to: dba

If your environment requires fine grained security use the defaults.

Prerequisites Check

 Change anything specified before continuing.

Summary

 After reviewing select: 

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/12.2.0.1/dbhome_1/root.sh

Example Log monitoring: tail -f /u01/app/oraInventory/logs/installActions2017-11-13_12-38-12PM.log

Finish

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

Post Installation Actions

SQLPlus - Set Global Profile Settings

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

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

Install Flash Player and Test Database Express

Oracle's new OEM Database Express requires a Flash player to be installed for each different Browser you will be using with it. OEM Database Express replaces the old dbconsole.

Init Your Standard Support Environment

  • Scripts
  • Configure cron for your Oracle maintenance jobs.
  • Install rlwrap so you can use arrow keys in Oracle console apps.
  • Install any preferred tools.

Create Initial oracle BASH User Profile (.bashrc)

umask 022
# Get the aliases and functions (for .bash_profile)
#if [ -f ~/.bashrc ]; then
#	. ~/.bashrc
#fi

# 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
   umask 022
fi

# Environment Vars
#ORACLE_SID=oradb; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/local/bin:.local/bin:$HOME/bin
export PATH

export TEMP=/tmp
export TMPDIR=/tmp

# Aliases - Common
alias cl='crontab -l'
alias l9='ls -alt | head -9' 
alias l20='ls -alt | head -20'
alias l50='ls -alt | head -50'
alias tf='date;ls -l|wc -l'

# 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 clog='tail -f $ORACLE_BASE/diag/crs/$HOSTNAME/crs/trace/alert.log'
alias llog='tail -f $ORACLE_BASE/diag/tnslsnr/$HOSTNAME/listener/alert/log.xml'

alias dbs='srvctl status database -d $ORACLE_DB'
alias sqp='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'