Install Oracle Database 12c R1

Let us see the procedures to install Oracle's latest database verion, 12c R1 on a x86_64 Linux machine in this article.

OS Requriments

Below are the OS requirements

Memory4 GB
Swap8 GB
Disk Space6.4 GB
binutils- (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (i686)
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst- (x86_64)
libXtst- (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
sysstat-9.0.4-11.el6 (x86_64)
Create Directory for Oracle Home

We would like to install the software in the directory /opt/oracle/product/12.1.0/db_2.

mkdir -p /opt/oracle/product/12.1.0/db_2
hosts File

If your /etc/hosts file does not contain the name of the host, add it

cat /etc/hosts   localhost localhost.localdomain  orcl

If there is an earlier version of Oracle database running, there will not be any changes to limits.conf. But for referrence, I've put the file below.

cat /etc/security/limits.conf
oracle               soft    nproc   2047
oracle               hard    nproc   16384
oracle               soft    nofile  4096
oracle               hard    nofile  65536
oracle               soft    stack   10240
#oracle              hard    stack   32768
Download the Oracle 12c R1 Database software

Download the software from Oracle Technology Network. The database software comes in two .zip files as below :

Extract the files

Unzip the files using unzip command.

$ unzip
$ unzip

As a result, a directory by name database will be created and has the following content.

$ cd database/

$ ls -l
total 36
drwxr-xr-x.  4 oracle oinstall 4096 Nov  7 21:14 install
drwxrwxr-x.  2 oracle oinstall 4096 Jul  7  2014 response
drwxr-xr-x.  2 oracle oinstall 4096 Jul  7  2014 rpm
-rwxr-xr-x.  1 oracle oinstall 8533 Jul  7  2014 runInstaller
drwxrwxr-x.  2 oracle oinstall 4096 Jul  7  2014 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jul  7  2014 stage
-rwxr-xr-x.  1 oracle oinstall  500 Feb  7  2013 welcome.html
Install the software

Make sure that you are logged in as the owner of the software, mostly oracle. Run the runInstaller script to initiate the Oracle Universal Installer GUI.

$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 5465 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-11-07_09-18-16PM. Please wait ...[oracle@orcl database]$
Screen 1

Installation started successfully. Uncheck I wish to receive security updates via My Oracle Support and click Next button.
Sceen 1

You will receive this dialog box. Click Yes
Sceen 1
Screen 2

Choose Install database software only
Sceen 2
Screen 3

Choose Single instance database installation
Sceen 3
Screen 4

Choose appropriate language if you want database to run on language other than English
Sceen 4
Screen 5

Choose Enterprise Edition
Sceen 5
Screen 6

Provide Oracle Home and Oracle Base directories
Sceen 6
Screen 7

Provide appropriate OS groups
Sceen 7
Screen 8

Prerequisites. I have issue with Swap and SHMMAX parameters which I fixed later.
Sceen 8
Screen 9

Summary. Nothing to be done here.
Sceen 9
Screen 10

Installation in progress. Nothing to be done here.
Sceen 10
Screen 10

Time to execute This script should be run as root user.
Sceen 10
Execute Script

Connect to a terminal as root user and run script.
Execute Script
Screen 11

Installation completed successfully
Sceen 11