oracledba.help
Legacy

Oracle 12c (12.1.0.2) Database Installation

<- Legacy

Overview

What follows is the most common way to install the Oracle 12c database product on LINUX for 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 and various manual actions. Also, the removal of some components may require downtime. Dont use Automatic Memory Management (AMM) for Linux Oracle systems.

In the following the database name is oradb. Change as required for your environment.

Full Oracle installation docs for LINUX can be found here.

TOC

Prerequisites

  • LINUX running 3.8.13-98.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) ensure that ASM and all connectivity for cluster is OK.
  • If GI for RAC run the Cluster Verification Utility.

Single Database Installation

 0. 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

 1. Log into GUI as the oracle user, run the Installer:
    cd /u01/orasw/database
    ./runInstaller &

 2. Configure Security Updates
    • Set Oracle support connection parameters.
      Email: {DBA Email Address}
      ☐ I wish to receive security updates via My Oracle Support
    • If behind a secure network blocked to the Internet:
      ☑ I want to remain uninformed...
      [Continue]

 3. Installation Option
    🖸 Install database software only 

 4. Installation Options
    🖸 Single instance database installation

 5. Product Languages
    Selected Languages: (use default)

 6. Database Edition
    🖸 Enterprise Edition

 7. Installation Location
    Oracle base:         /u01/app/oracle
    Software location:   /u01/app/oracle/product/12.1.0.2/dbhome_1

 8. Create Inventory  (if not already created)
    Inventory Directory:     /u01/app/oraInventory
    oraInventory Group Name: oinstall

 9. Privileged OS Groups
    Set all to: dba
    If your environment requires fine grained security use the defaults.

 10. Prerequisites Check
     Ignorable Warnings. Fix any other issues then return to this point.

 11. Summary
     After reviewing select: [Install]
     Product installation runs...

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

 12. Finish
     If successful you will see: 
     The installation of Oracle Database was successful.
     Select: [Close]

RAC Database Installation

Check the status of the cluster and ensure everything looks good before proceeding.

 0. Login as the oracle user account on node 1.

 1. Run Installer
    cd /u01/orasw/database
    ./runInstaller &

 2. Configure Security Updates
    • Set Oracle support connection parameters.
      Email: {DBA Email Address}
    • If behind a secure network blocked to the Internet:  
      ☐ Connect to Support Hub through a proxy.
      ☑ I want to remain uninformed...
      [Continue]

 3. Installation Option
    🖸 Install database software only

 4. Grid Installation Options
    🖸 Oracle Real Application Clusters database installation

 5. Nodes Selection
    Example:
    ☑ lnx01
    ☑ lnx02
    If adding a new node just select the node you are adding.

   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.
   When [Next] selected, checks will run to ensure installation can be perform on all nodes.

 6. Product Languages
    Selected Languages: (use default)

 7. Database Edition
    🖸 Enterprise Edition

 8. Installation Location
    Oracle base:         /u01/app/oracle
    Software location:   /u01/app/oracle/product/12.1.0.2/dbhome_1

    Some remote checks are performed...after pressing [Next]

 9. Operating System Groups
    Set all to: dba
    If your environment requires fine grained security use the defaults.

 10. Prerequisites Check
     Ignorable Warnings. Fix any other issues then return to this point.

 11. Summary
     After reviewing select: [Install]
     Product installation runs...

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

 12. Finish
     If successful you will see: 
     The installation of Oracle Database was successful.
     Select: [Close]

You can check the below log if you had any issues:

 /u01/oracle/oraInventory/logs/installActions<Date and Time>.log

Post Installation Actions

Create Initial oracle BASH User Profile (.bashrc)

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/12.1.0.2/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='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 /u01/app/grid/diag/crs/$(hostname -s)/crs/trace/alert.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 oslog='tail -f /var/log/messages'
alias rmn='rlwrap $ORACLE_HOME/bin/rman target / nocatalog'
alias sqp='rlwrap sqlplus sys/go@oradb as sysdba'
alias sqldev='cd $ORACLE_HOME/sqldeveloper/sqldeveloper/bin;./sqldeveloper &'
alias src='source $HOME/.bashrc'

For oslog: chmod 644 /var/log/messages

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> "

INS-06006 Passwordless SSH

Clean up the files in .ssh directory for oracle user in VNC session:

 cd $HOME/.ssh
 rm -rf *

In the OUI session, click SSH "Setup" again to setup SSH for grid user from scratch, then click "Test" in OUI, Now it completes with "SSH for user grid has already been setup".

Click "Next" in the OUI to complete the installation.


Ignorable Warnings

Task resolv.conf Integrity

 /etc/resolv.conf may not be able to resolve some VirtualBox IPs.

/dev/shm mounted as temporary file system

 PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm
 False positive when using Linux 7.x.

PRVF-9802 : Attempt to get 'udev' information from node "lnx02" failed No UDEV rule found for device(s) specified.

 Udev checks should show other node rules file and disk configured OK.