Saturday, February 24, 2018

Oracle Database 12c Release 2 (12.2) Installation on Oracle Enterprise Linux 6 (OEL6)

This article describes the installation of Oracle Database 12c Release 2 on Oracle Enterprise Linux 6 (OEL6) on VirtualBox.


For installing 12cR2 in your laptop or desktop computer has minimum 4 GB or more of RAM required, and minimum 30GB storage required and used oracle virtualBox showed in this article.

This article uses the 64-bit versions of Oracle Enterprise Linux, and Oracle 12c Release 2 (

Prerequisite: Oracle Enterprise Linux 6 Install on VirtualBox

Download Software:

Download Oracle 12cR2 database software for Linux x86-64 from OTN or Edelivery and copy the files to linux server (on VirtualBox) using winscp or shared folder.

OS Configuration and Preparation:
1) Add the following lines to the "/etc/sysctl.conf" file
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500            
2) Run the following command to change the current kernel parameters.
/sbin/sysctl -p           
3) Add the following lines to "/etc/security/limits.conf" file
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728          
4) Create the new groups and users.
#groups for database management
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper         
Add user Oracle for database software
useradd -u 54321 -g oinstall -G dba,oper oracle          
5) Set the password for the "oracle" user.
passwd oracle           
6) The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages should be installed already.
 # OL6 and OL7 (RHEL6 and RHEL7)
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y

# Required for 12.1, not listed for 12.2
yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y

# OL6 only (RHEL6 only)
yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y         
7) Create directory structure as user root
mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
chown -R oracle:dba /u01
chmod -R 775 /u01          


1) Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY           
2) Unizp software it will create directory "database". Goto database directory and Start the Oracle Universal Installer (OUI) by issuing the following command.
-bash-4.1$ ls -rlt                                                                                                           
total 3376056                                                                                                                
drwxr-xr-x 7 oracle dba       4096 Jan 26  2017 database
-rw-r--r-- 1 oracle dba 3453696911 Mar  1  2017
-bash-4.1$ cd database/
-bash-4.1$ ls -rlt
total 36
-rwxr-xr-x  1 oracle dba  500 Feb  6  2013 welcome.html
drwxr-xr-x  4 oracle dba 4096 Jan 26  2017 install
-rwxr-xr-x  1 oracle dba 8771 Jan 26  2017 runInstaller
drwxr-xr-x  2 oracle dba 4096 Jan 26  2017 rpm
drwxrwxr-x  2 oracle dba 4096 Jan 26  2017 sshsetup
drwxrwxr-x  2 oracle dba 4096 Jan 26  2017 response
drwxr-xr-x 14 oracle dba 4096 Jan 26  2017 stage
-bash-4.1$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 3752 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16383 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 65536    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-02-23_09-32-39PM. Please wait                     

3) Uncheck checkbox "I wish to receive security updates via My Oracle Support" and then click "Next" button.

4) Ignore following message and click “Yes” button.

5) Select install option, Here I have choosen "Install database software only", to install the database software. 
You can choose "Create and configure a database" option, If you want to install database software and create database in single shot.

6) Select Database Installation Option, Accept default “Single instance database installation” and click “Next” button 

7) Select Database Edition, You can select here type of binaries to install. Once it’s done click “Next” button.

8) Installation Location, here you should see directories for ORACLE_BASE and ORACLE_HOME for your binaries according to environmental settings. Click “Next” button.

9) Operating system groups, here you can specify OS group for each oracle group. Change default groups to dba and click “Next” button.

10) Summary, If everything isfine, then click “Install” button. It’s the last moment to come back to each of previous point and make changes.

11) Product installation

12) Execute configuration script, once binaries are installed the last step is to run script as user root.  

13) After successful installation click "Close" button.

That's it. Installed the Oracle 12cR2 software on Oracle Enterprise linux 6.

In my next post will cover database creation.