100% found this document useful (1 vote)
26 views15 pages

Module 1 _ Oracle 12c Linux Silent Installation

This document outlines the process for installing Oracle Database 12c using silent installation methods on both Windows and Linux systems. It includes pre-installation requirements, necessary configurations, and detailed steps for creating users, setting permissions, and configuring kernel parameters. Additionally, it provides a script for checking system prerequisites and instructions for troubleshooting installation issues.

Uploaded by

D Pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
26 views15 pages

Module 1 _ Oracle 12c Linux Silent Installation

This document outlines the process for installing Oracle Database 12c using silent installation methods on both Windows and Linux systems. It includes pre-installation requirements, necessary configurations, and detailed steps for creating users, setting permissions, and configuring kernel parameters. Additionally, it provides a script for checking system prerequisites and instructions for troubleshooting installation issues.

Uploaded by

D Pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

ORACLE DATABASE INSTALLATION

Module 1: Installing the Oracle Binaries


Oracle 12c Silent Install

ORACLE DATABASE ADMINISTRATION SERIES

S.N STEPHEN N NJOROGE

LinkedIn: www.linkedln.com/in/stephen-njoroge

SENIOR DATABSE ADMINISTRATOR | MSSQL | ORACLE| PostgreSQL |OCI |AWS |

DATABASE ADMINISTRATION SERIES |


Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install

This module focuses on techniques for installing Oracle in an efficient and repeatable manner and which includes silent
installations relying on a response file.

Understanding the OFA

 Oracle Inventory Directory


 Oracle Base Directory
 Oracle Home Directory
 Oracle Network Files Directory
 Automatic Diagnostic Repository
Installing Oracle-in Windows 10
 Step 1. Create the OS Groups and User
 Step 2. Ensure That the OS Is Adequately Configured
 Step 3. Obtain the Oracle Installation Software
 Step 4. Unzip the Files
 Step 5: Creating oraInst.loc File
 Step 6. Configure the Response File, and Run the Installer
 Step 7. Troubleshoot Any Issues
 Step 8. Installing Oracle Software

Silent Installing Oracle Binaries in linux systems

 Check hardware requirements


 Check os compatibility
 Install packages
 Create users and groups
 Create required directioes
 Parameters settings
 Create response files
 Create database
 Connect to the database.
Upgrading Oracle Software
Reinstalling After Failed Installation
Applying Interim Patches
Installing Remotely with the Graphical Installer
Step 1. Install X Software and Networking Utilities on the Local PC
Step 2. Start an X Session on the Local Computer
Step 3. Copy the Oracle Installation Media to the Remote Server
Step 4. Run the xhost Command
Step 5. Log In to the Remote Computer from X
Step 6. Ensure that the DISPLAY Variable Is Set Correctly on the Remote Computer
Step 7. Execute the runInstaller Utility
Step 8. Troubleshoot

2
2
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
How to install Oracle Database 12c on a Linux system

Pre-Installation Requirements

Check Hardware Requirements

 RAM: Minimum 2GB (4GB recommended)


 Swap space: At least 1.5x RAM if RAM < 4GB
 Disk space: Around 6–8GB for software + space for datafiles
 CPU: At least 1GHz (dual-core or higher recommended)

Check OS Compatibility

Oracle Database 12c is certified on:


 Oracle Linux 6/7
 RHEL 6/7
 CentOS 6/7
Run:

cat /etc/os-release
uname -r

Install Required OS Packages

sudo yum groupinstall "Development Tools" -y


sudo yum install -y binutils gcc make glibc glibc-devel ksh libaio
libaio-devel \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel sysstat
unixODBC \
unixODBC-devel libgcc libstdc++ libstdc++-devel

3
3
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Create Required Users and Groups

sudo groupadd oinstall


sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
sudo passwd Oracle

Create Directories and Set Permissions

sudo mkdir -p /u01/app/oracle


sudo chown -R oracle:oinstall /u01
sudo chmod -R 775 /u01

4
4
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Set Kernel Parameters

Edit /etc/sysctl.conf and add:


fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8589934592
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 changes:

sudo sysctl –p

source ~/.bash_profile

Set User Limits

Edit /etc/security/limits.conf:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

Set Environment Variables

5
5
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Edit /home/oracle/.bash_profile:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

Apply:

Alternatively, use the script below to check the minimum system requirements for oracle 12c installation. The script will check
and log the result in a oracle12c_prereq_check.log file.

6
6
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Oracle12c_prereq_check.sh
#!/bin/bash

LOG_FILE="oracle12c_prereq_check.log"
exec > >(tee -a "$LOG_FILE") 2>&1

echo -e "\n=== Oracle Database 12c Prerequisite Check ==="


echo "Log File: $LOG_FILE"
echo "Run Date: $(date)"
echo "Host: $(hostname -f)"
echo "----------------------------------------------"

# Colors for terminal output


GREEN="\e[32m"
RED="\e[31m"
RESET="\e[0m"

function print_result() {
local message="$1"
local status="$2"

if [[ $status == "PASS" ]]; then


echo -e "$message: ${GREEN}PASS${RESET}"
else
echo -e "$message: ${RED}FAIL${RESET}"
fi
}

7
7
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
function check_equal() {
[[ "$1" == "$2" ]] && print_result "$3" "PASS" || print_result "$3
(Found: $1, Expected: $2)" "FAIL"
}

# 1. OS and Kernel
echo -e "\n[1] OS and Kernel Version"
os=$(grep ^NAME /etc/os-release | cut -d= -f2)
kernel=$(uname -r)
echo "OS: $os"
echo "Kernel: $kernel"

# 2. Memory & Swap


echo -e "\n[2] Memory and Swap"
mem_kb=$(grep MemTotal /proc/meminfo | awk '{print $2}')
swap_kb=$(grep SwapTotal /proc/meminfo | awk '{print $2}')
mem_gb=$((mem_kb / 1024 / 1024))
swap_gb=$((swap_kb / 1024 / 1024))
echo "Memory: $mem_gb GB"
echo "Swap: $swap_gb GB"
[[ $mem_kb -ge 2097152 ]] && print_result "Memory >= 2GB" "PASS" ||
print_result "Memory >= 2GB" "FAIL"
[[ $swap_kb -ge 1048576 ]] && print_result "Swap >= 1GB" "PASS" ||
print_result "Swap >= 1GB" "FAIL"

# 3. Disk Space
echo -e "\n[3] Disk Space (/tmp and /u01)"
df -h /tmp /u01 2>/dev/null || echo -e "${RED}/u01 not found${RESET}"

# 4. Required Packages
echo -e "\n[4] Required Packages"
REQUIRED_PKGS=(
binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-
devel
ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat
unixODBC unixODBC-devel elfutils-libelf elfutils-libelf-devel
)

for pkg in "${REQUIRED_PKGS[@]}"; do


rpm -q $pkg &>/dev/null && print_result "$pkg" "PASS" || print_result
"$pkg" "FAIL"
done

# 5. User and Groups


echo -e "\n[5] Oracle User and Groups"
id oracle &>/dev/null && print_result "User oracle" "PASS" ||
print_result "User oracle" "FAIL"
getent group oinstall >/dev/null && print_result "Group oinstall"
"PASS" || print_result "Group oinstall" "FAIL"

8
8
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
getent group dba >/dev/null && print_result "Group dba" "PASS" ||
print_result "Group dba" "FAIL"

# 6. Kernel Parameters
echo -e "\n[6] Kernel Parameters"
declare -A sysctl_params=(
[fs.aio-max-nr]=1048576
[fs.file-max]=6815744
[kernel.shmall]=2097152
[kernel.shmmax]=8589934592
[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
)

for param in "${!sysctl_params[@]}"; do


actual=$(sysctl -n $param 2>/dev/null)
expected=${sysctl_params[$param]}
[[ "$actual" == "$expected" ]] && print_result "$param" "PASS" ||
print_result "$param (Found: $actual, Expected: $expected)" "FAIL"
done

# 7. Ulimits
echo -e "\n[7] Ulimits (run as oracle)"
if [[ $(whoami) == "oracle" ]]; then
u1=$(ulimit -u)
u2=$(ulimit -n)
u3=$(ulimit -s)
check_equal "$u1" "2047" "Max user processes (nproc)"
check_equal "$u2" "65536" "Open files (nofile)"
check_equal "$u3" "10240" "Stack size (stack)"
else
echo -e "${RED}Run this as 'oracle' user to check ulimits.${RESET}"
fi

# 8. Environment Variables
echo -e "\n[8] Oracle Environment Variables"
if [[ $(whoami) == "oracle" ]]; then
echo "ORACLE_BASE: $ORACLE_BASE"
echo "ORACLE_HOME: $ORACLE_HOME"
echo "ORACLE_SID: $ORACLE_SID"
else
echo -e "${RED}Run as oracle user to verify ORACLE_BASE/HOME/SID${RESET}"

9
9
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
fi

# 9. GUI/X11 (optional)
echo -e "\n[9] GUI/X11"
echo "DISPLAY: $DISPLAY"
command -v xclock &>/dev/null && print_result "xclock installed" "PASS"
|| print_result "xclock installed" "FAIL"

# 10. Hostname Resolution


echo -e "\n[10] Hostname and Network"
hostname
ping -c1 $(hostname) &>/dev/null && print_result "Ping hostname" "PASS"
|| print_result "Ping hostname" "FAIL"

echo -e "\n=== Prerequisite Check Completed ==="


echo "Log saved to: $LOG_FILE"

Sample output from the log file.

Oracle 12c single instance installation- Silent Install

Overviews

 Product: Oracle Database 12c (Single Instance)


 Install Type: Silent (no GUI)
 OS: Linux (RHEL/CentOS/Oracle Linux)
 User: oracle
 Groups: oinstall, dba
 Install Location: /u01/app/oracle/product/12.1.0/dbhome_1
 Response File: db_install.rsp

Prerequisite

10
10
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Create Required OS Groups & User
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

Create Directory Structure


mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Set Kernel Parameters and Ulimits

Update /etc/sysctl.conf:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8589934592
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 changes:

sysctl –p

Edit /etc/security/limits.conf:

oracle soft nproc 2047


oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

Update PAM:

echo "session required pam_limits.so" >> /etc/pam.d/login

11
11
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Install Required Packages

yum install -y binutils gcc gcc-c++ glibc glibc-devel libaio libaio-


devel \
make sysstat unixODBC unixODBC-devel ksh compat-libstdc++-33 compat-
libcap1 \
elfutils-libelf elfutils-libelf-devel

Set environment Variables

Edit /home/oracle/.bash_profile:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022

Apply:
source ~/.bash_profile

Download and Unzip Software Package.

Get the product from https://edelivery.oracle.com/osdc/faces/SoftwareDelivery


As oracle:

mkdir -p /home/oracle/install
cd /home/oracle/install

# Assuming you’ve downloaded these:


unzip V839960-01.zip

Create a response file and install

Navigate to the database folder:

12
12
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
cd /home/oracle/install
mv database /u01/app/oracle/database/response
cd /u01/app/oracle/database/response
cp db_install.rsp db_install_custom.rsp

Edit db_install_custom.rsp:

oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=dba
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
DECLINE_SECURITY_UPDATES=true

Validate the installation parameters


./runInstaller -silent \
-ignorePrereq \
-waitforcompletion \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSOPER_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
DECLINE_SECURITY_UPDATES=true

13
13
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Run root scripts (as root)

After install, it will ask to run:


/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/12.2.0/dbhome_1/root.sh

Create a database

Create DB using dbca in silent mode.


Create a response file:

cd /home/oracle/install/database/response
cp dbca.rsp dbca_custom.rsp

Edit dbca_custom.rsp:
gdbName=ORCL
sid=ORCL
templateName=General_Purpose.dbc
characterSet=AL32UTF8
sysPassword=YourSysPwd
systemPassword=YourSystemPwd
datafileDestination=/u01/app/oracle/oradata
emConfiguration=NONE
databaseType=MULTIPURPOSE
automaticMemoryManagement=false
totalMemory=2048

14
14
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install
Run DBCA silently:
dbca -silent -responseFile /home/oracle/install/database/response/dbca_custom.rsp
VERIFY INSTALLATION
ps -ef | grep pmon
lsnrctl status

sqlplus / as sysdba

15
15
Module 1: Installing the Oracle Binaries- Oracle 12c Silent Install

You might also like