How to Install Oracle 11g R2 on RHEL-6 step by step

In this article, we are going to discuss how to install Oracle 11g R2, a brief guide on Redhat Linux 6 (64 bit). This article discusses Oracle 11g (R2) Database server installation, this server minimum 2 GB swap size, and selinux=permissive. For Linux Installation see my Linux Installation post or Video.

How to install oracle 11g on Linux

Download Oracle Database Software from the Oracle website, it will be downloaded in two parts. Then unzip both files after unzipping these files making a single database folder. For unzip follow the below steps.

Unzip downloaded files:

# mkdir /u01
# unzip -d/u01
# unzip -d/u01

Now you have a single Database folder that has a runInstaller file.

Edit Hosts file

using the below steps edit your host’s file carefully. In the Hosts file, you have to fully specify your hostname and your machine IP address.

#vi /etc/hosts       (hit enter then press I for insert mode then edit it)

For Example.

<ip address >  <full name of machine >   <short name of your machine>         ocptechnology

After the update, save this file press Esc then shif+: then wq then Enter.

Edit sysctl.conf

Now we need to edit sysctl.conf file for updating kernel parameters, open it and just copy-paste the below parameter at end of this file.

#vi /etc/sysctl.conf

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500

After that run the below command for applying changes of sysctl.conf file.

#/sbin/sysctl -p

Edit limits.conf

Now Edit limits.conf and add following lines in end of this file.

#vi /etc/security/limits.conf

oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240

Edit /etc/pam.d/login

Now Edit /etc/pam.d/login file and add below line.

#vi /etc/pam.d/login

session    required

Install required RPMs

Now install the required packages for configuring Oracle Database to installing these RPMs using YUM server, for yum server configuration Click Here.

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 elfutils-libelf-devel -y

Once you successfully installed all the RPMs then follow the below steps.

Group and Users

Now add necessary Groups and add an Oracle user for installation.

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

useradd -g oinstall -G dba,oper oracle

--set the password for oracle user

passwd oracle

Grant Permissions

Now grant ownership and read-write permissions to oracle users on the directory (which we are going to use for oracle installation)

chown -R oracle:oinstall /u01
chmod -R 775 /u01

Disable Firewall and Selinux

Now make the firewall disabled using the setup command. Following below steps.

#setup -- firewall configuration--disable

Now set selinux=permissive

#vi /etc/selinux/config

Edit .bash_profile

Now edit .bash_profile and set the below parameters (check your oracle home directory carefully) inside .bash_profile.

Login with ORACLE user:

# Oracle Settings
 TMP=/tmp; export TMP

 export TMPDIR
 ORACLE_HOSTNAME=rhel6.localdomain; export ORACLE_HOSTNAME
 ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
 ORACLE_SID=db11g; export ORACLE_SID
 PATH=/usr/sbin:$PATH; export PATH


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

Now you need to take reboot your machine to apply changes, or you can skip the reboot just run below command.

. .bash_profile  (this command load .bash_profile parameter in memory)

Start ./runInstaller

This is the final step, after running ./runinstaller the GUI interface appear just follow the instruction. For more clarity watch the above video.

cd /u01/database

Note: If you got any error related to pdksh rpm then download this rpm file from the internet and install it then try again.

Connect with me on:


3 thoughts on “How to Install Oracle 11g R2 on RHEL-6 step by step”

Leave a Comment

%d bloggers like this:
Enable Notifications    OK No thanks