How to Install ORACLE 12c R1 on ORACLE Linux 7 step by step

In this post, I’m going to demonstrate to you how to install ORACLE 12c Release 1 (12.1) on ORACLE LINUX-7 64 bit step by step. For ORACLE 12c  installation minimum 2GB swap required.

Download ORACLE 12c R1 software form accept OTN License Agreement, it’s download in two parts and it’s a zip file.

Start Oracle Installation

After downloading software unzip file using the following command.

# mkdir /u01
# unzip linuxamd64_12102_database_1of2 -d/u01
# unzip linuxamd64_12102_database_2of2 -d/u01

After unzip these zip files now you have a single folder name is “database” which is containing installation file.

Now edit Hosts file, it’s contain IP Address & Hostname of machine using following command. Set host name using below command.

Update hostname

#vi /etc/hostname   localhost localhost.localdomain localhost4 localhost4.localdomain4    ol7.localdomain    oracle

We have two methods of Oracle 12c Installation

  1. Automatic
  2. Manual

1. Automatic Setup

For automatic installation run the below command but before running the below command you must have to configure YUM Server.

# yum install oracle-rdbms-server-12cR1-preinstall -y

This command is set automatically all requirement settings.

2. Manual Setup

In this article we are going to follow Manual method of oracle 12 installation. Add bellow lines in “/etc/sysctl.conf” file using below command.

# vi /etc/sysctl.conf

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

Save changes using press Esc then Shift+: then wq then hit Enter. After saving these changes, run the below command for applying changes.

# /sbin/sysctl -p

Add bellow line in ‘/etc/security/limits.conf’ using bellow command.

#vi /etc/security/limits.conf

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

Install Required RPMs

Now install Linux packages which are required for ORACLE installation, following bellow command, here we are installing .rpm file using YUM server, for YUM server configuration please visit on my website and to through it. Maybe some packages are already installed.

yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -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 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 libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y

Create Oracle user and Groups

Now create some groups and user, using following commands.

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper

useradd -u 54321 -g oinstall -G dba,oper oracle

Set the password for ORACLE user using following command.

passwd oracle

Set SELINUX = permissive using below command, and firewall must be disabled, using bellow command.

# vi /etc/selinux/config


--Disable firewall
# systemctl disable firewalld

Create some appropriate Directories where is ORACLE software will be install, and giving privileges, using bellow command.

mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Update .bash_profile

Login as Oracle user and update .bash_profile as below.

#vi .bash_profile

# Oracle installation Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol7.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    ulimit -u 16384 -n 65536

After saving this file start runInstaller using bellow command.

$ cd /u01/database
$ ./runInstaller

For more details, watch above video, If you found this article informative feel free write in comment box.

Read – How to Restore RMAN Backup with a Different Database Name

Connect with me on:


Leave a Comment

%d bloggers like this: