How to install Oracle Database 12c Step by Step

    Hi Geeks, in this article we will see how to install Oracle Database 12C on a Linux host.  The Step by Step comes with all the commands and the video tutorial.  Please leave your comments and questions regarding the installation or you can like and share the article if you found it useful.

1 - Download the Oracle Database Software

Oracle Database 12C

2 - Create group and user that will install Oracle Database

groupadd oinstall
groupadd dba groupadd oper useradd -G dba,oper -g oinstall oracle passwd oracle

3 - Create the folder where you install the Oracle Database

mkdir -p /u01/app/oracle/product/12.1/db_1
mkdir -p /u01/setup
chown -R oracle:oinstall /u01
chmod -R 775 /u01

4 - Edit the sysctl.conf and limits.conf files and add the following parameter files

  • this values are required by Oracle Database
vim /etc/sysctl.conf
add the following lines
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

-- reload 

#/sbin/sysctl -p

vim /etc/security/limits.conf
add the following lines
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768

5 - Install all the required packages for Oracle Database to properly function

yum install binutils compat-libcap1 compat-libstdc++-33 
compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686
 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 
 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686
 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext
 libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau 
 libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat
 unixODBC unixODBC-devel -y

6 - Edit the host file to reflect the host name.

  • the ip and the hosts names are your choice.
vim /etc/hosts
add the following lines
<your ip address <host.domain <host

7 -  Setup your environment variable for ORACLE user.

  • make sure you switch to Oracle user and add the following lines in the .bash_profile file.
$ vim .bash_profile
add the following lines
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=oracle.test
export ORACLE_UNQNAME=dbtest
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1/db_1
export ORACLE_SID=dbtest
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Note: - this configurations will apply if you have used the same path as me, otherwise you will need change them accordingly.

8 - Unzip  the installer files

$unzip Linuxamd64_12c_database_1of2.zip.zip
$unzip Linuxamd64_12c_database_2of2.zip.zip

9 -  Install the Oracle Database

$xhost +
$cd /u01/setup/database
$./runInstaller
now, install ORACLE DATABSE using DBCA
$dbca
Note: Follow the video tutorial to see the rest of the Database Creation and validation.

Follow the Step by Step Oracle 12C installation Video Tutorial

How to Install Oracle Database 12C -  Part 1 Setup Host

Install Oracle Database 12C - Part 2 Install Oracle Database