Step by step oracle 11g R2 database installation with ASM

Step by step oracle 11g R2 database installation with ASM.
This Document is prepared for RHEL 5.4 with oracle 11gR2
Minimum Prerequisites:-
1>     A physical server with RHEL 5.4 installed
2>     Minimum 2G RAM
3>     All the oracle required RPM and kernel parameters
4>     Oracle database and grid infrastructure binaries.
5>     A valid OS group and OS user (oracle).
6>     A mount point to be used for oracle binaries installation with proper permission.
7>     Raw disks for ASM disk group.
i)                    Download oracle database and grid infrastructure binaries.
You can follow the below link to download for Linux
ii)                   Unzip the grid infrastructure binaries to a staging area (/home/oracle in my case)
unzip linux_11gR2_grid
Step2:- Prepare your Linux Box for Oracle
You must have a user which will own the oracle binaries. Follow the below steps to create
i)                    Login as root and create group and user
groupadd oinstall
groupadd dba
useradd –g oinstall –G dba oracle
ii)                   Change the oracle user password
passwd oracle
iii)                 Identify the mount point you will use to install the oracle binaries in my case it is /u01 and create the below directories and change ownership to oracle as below
mkdir –p /u01/app/oracle/product/11.2.0/grid
mkdir –p /u01/app/oracle/product/11.2.0/db_1
chown –R oracle:oinstall /u01
chmod –R 755 /u01
iv)                 Check whether the below mentioned RPMs are installed or not
rpm –qa
  • compat-libstdc++
  • glibc
  • glibc-devel
  • gcc
  • gcc-c++
  • libaio-devel
  • libstdc++
  • libstdc++-devel
  • make
  • sysstat
  • unixODBC
  • unixODBC-devel
  • elfutils-libelf
  • elfutils-libelf-devel
if any package (RPM) is not present install it first before proceeding ahead. Execute  below command as root user to install a RPM
rpm –ivh
v)                  set the below kernel parameters make an entry in/etc/sysctl.conf file

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

Issue the below command to bring the modified kernel parameter values in effect without rebooting the server.
/sbin/sysctl -p

Add the following lines to the "/etc/security/limits.conf" file.
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536

vi)                 Validate the /etc/hosts file to have the correct entries. It should look like below               localhost.localdomain localhost  prod
Setup the raw volumes for ASM disks. If you are running with VM use below steps to get the raw disks for ASM
i)                    Go to your VM machine
ii)                   Click on edit virtual machine settings
Click on add and choose Hard Disk from hardware and click next. Follow the GUI instructions and  add a Hard disk of 50 GB size.

iii)                 Login as root user and follow the below steps to create the partition of the disk that you have just now added.

Note:- Here I have created 2 partitions each 10G in size
Verify the partition you have just now created
iv)                 Configure the partitions to use as raw disks.
Put the below entry in /etc/sysconfig/rawdevices
/dev/raw/raw5 /dev/sdb5
/dev/raw/raw6 /dev/sdb6
v)                  Restart the raw device service
service rawdevices restart
vi)                 ls -lrt /dev/raw/raw*
crw------- 1 root root 162, 5 Jun 28 19:09 /dev/raw/raw5
crw------- 1 root root 162, 6 Jun 28 19:09 /dev/raw/raw6
vii)               Change the permission for these raw volumes for oracle as mentioned below
chown oracle:oinstall /dev/raw/raw*
 chmod -R 755 /dev/raw/raw*
viii)              This permission change is session specific. To make it permanent across the reboot put the below entry in /etc/rc.local and you are done with the raw volume setup
chown oracle:oinstall /dev/raw/raw*
 chmod -R 755 /dev/raw/raw*

Step 4:-
Login as oracle and go to the staging directory where you have unzipped the grind infrastructure binaries. In my case its /home/oracle
cd /home/oracle/grid
./ runInstaller
Follow the instruction of GUI

Give some name to the asm disk group in my case its DATA (default) and choose the disks that would be the part of this disk group

Do remember this password as when you will create the database you will be prompted to enter the ASMSNMP user password 

Simply click yes

Make sure your oracle base and oracle home location is correct

In the below screen you can find that there are some prerequisites’ failing .  you can click on fix and check again button
Once you click fix and check again you will be prompted to execute a script as root user. This script will fix all those parameters for which fixable is yes in the below screen.
Once done with execution of this script click ok and proceed with  the installation

Step 5:- Unzip the database binaries in the staging area
you will get a database directory after successful unzip of the above 2 files
go to this database directory and execute runinstaller again. Follow the GUI instruction

cd /home/oracle/database/
./ runInstaller

Make sure oracle base and oracle home locations are correct
Enter the ASMSNMP user password. This password you have entered while installing grid infra in the above steps

Click finish here . Once your installation is completed you will be prompted to execute the script as root user. Execute the script and click on and you are done


  1. sirji nyce blog.... its really helpful to the person who is new to dataguard... :) Keep it up...

  2. pictures are not appearing kindly provide with pictures.