How to install Oracle Database 12c Release 1 (12.1) On Redhat Linux 6

ORACLE 12C INSTALLATION

In this tutorial, I’m going to demonstrate to you how to install Oracle Database 12c Release 1 (12.1) (64-bit) on Redhat Linux 6 (64-bit). The tutorial is based on a server installation with a minimum of 2G swap, set (selinux=permissive), and the firewall disabled. The following package groups were included for this installation.

Software Required

For this installation i’m use below softwares

  • VMWare workstation 12
  • Redhat Linux 6 (64-bit)
  • Oracle Database 12c (64-bit)

Start Oracle 12c Installation

Watch Oracle 12c Installation video

Step 1. Create following directories which is using for Oracle software installation grant ownership with read, write & execute permissions, as below.

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

Step 2. Unzip the downloaded oracle software files using unzip command.

unzip linuxamd64_12102_database_1of2.zip –d/u01
unzip linuxamd64_12102_database_2of2.zip –d/u01

Note: After unzip the oracle software file you will get a single folder name is “database“.

Step 3. The “/etc/hosts” file must contain a fully qualified name for the server.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

example:

192.168.1.10   rhel6.localdomain     oracle12c

Update /etc/sysctl.conf

Step 4. Now open “/etc/sysctl.conf” file and add following lines in end of file.

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

Run the below command to apply the current kernel parameter settings.

/sbin/sysctl -p

Create required Groups and Oracle user

Step 5. Now Create the new groups and database 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

Now Set the password for the “oracle” user.

passwd oracle

Update /etc/security/limits.conf

Step 6. Now edit “/etc/security/limits.conf” file and add below line in the end of 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

Install Required RPMs

Step 7. Now Install all the below packages using YUM server.

# From Public Yum or ULN

 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 binutils -y
 yum install compat-libcap1 -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 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

Step 8. Edit the “/etc/security/limits.d/90-nproc.conf” file as described below.

# Change it's
 *          soft    nproc    1024


# in To this
 * - nproc 16384

Disable Firewall and Selinux

Step 9. Set secure Linux to permissive by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as below.

SELINUX=permissive

Note: If your Linux firewall is enabled, you need to disabled it. After change it, restart the server (machine)

Update Oracle user .bash_profile

Step 10. Now login as the ORACLE user and open “.bash_profile” and add below parameter in the end of file.

# Oracle Settings
 export TMP=/tmp
 export TMPDIR=$TMP
 export ORACLE_HOSTNAME=ol6-121.localdomain
 export ORACLE_UNQNAME=cdb1
 export ORACLE_BASE=/u01/app/oracle
 export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
 export ORACLE_SID=cdb1
 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

Now start the Oracle Universal Installer (OUI) by running the below command in the database directory which is in the “/u01” directory using following commands.

Note: Run “./runinstaller” using below command as “ORACLE” user.

$cd /u01/database

 ./runInstaller

After that follow graphical instructions step by step OR watch below YouTube video.

Read - Step by Step to configure Oracle 12c Data Guard Physical Standby

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
https://www.youtube.com/ocptechnology

One thought on “How to install Oracle Database 12c Release 1 (12.1) On Redhat Linux 6

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top