Oracle database 10gR2 installation in RedHat 5.4

In this post I’ll show you the steps required to install Oracle Database 10g Release 2 on Red Hat Enterprise Linux 5.4 (64-bit)

Assuming you have downloaded Oracle Database 10g R2 from their official website.

If not you can get it from the below mentioned link

Oracle Database 10g R2 for Linux 64-bit

For my case I have disable Selinux. Please make sure you apply relevant policy for selinux in case you have it enforcing state.

Prerequisites before installing Oracle 10gR2

  • GUI Environment

Make sure you have a running GUI environment with all the packages inside group GNOME or KDE package installed.

You can do the same using

# yum groupinstall “GNOME Desktop Environment” “X Window System”

In case you want to use KDE desktop you can select the KDE group package instead of GNOME

  • Memory and Swap space

You can follow the below table which is as per the Oracle standards for installing Oracle Database 10g in a 64 bit Linux machine

RAM Swap Space
Up to 512 MB 2 times the size of RAM
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM

NOTE: In case you donot have enough swap memory space in your machine the follow this page for

How to increase Swap Memory size in Linux

You can check the RAM and SWAP space using this command
# free -m              total       used       free     shared    buffers     cached Mem:          4392       4352         39          0        149       3828 -/+ buffers/cache:        374       4018 Swap:         6399          0       6399
NOTE: In case you have assigned a different partition size for /tmp directory then make sure it has minimum 400 MB free space.

  • Hosts File

Your hosts file should be proper as shown below

# vi /etc/hosts localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 test.example test
Your machine should have a proper hostname. To check use the below command
# hostname test.example

  • Kernel Parameters

For Oracle 10g, the following kernel parameters have to be set to values greater than or equal to the recommended values.

To verify shmmax
# cat /proc/sys/kernel/shmmax shmmax = 2147483648
To verify shmmni
# cat /proc/sys/kernel/shmmni shmmni = 4096
To verify the shmall parameter
# cat /proc/sys/kernel/shmall shmall = 2097152
To verify shmmin
# ipcs -lm |grep “min seg size” shmmin = 1
Note that shmseg is hardcoded in the kernel, the default is much higher.

shmseg = 10
To verify semmsl
# cat /proc/sys/kernel/sem | awk ‘{print $1}’ semmsl = 250
To verify semmns
# cat /proc/sys/kernel/sem | awk ‘{print $2}’ semmns = 32000
To verify semopm
# cat /proc/sys/kernel/sem | awk ‘{print $3}’ semopm = 100
To verify semmni
# cat /proc/sys/kernel/sem | awk ‘{print $4}’ semmni = 128
To verify file-max

# cat /proc/sys/fs/file-max file-max = 65536
To verify ip_local_port_range

# cat /proc/sys/net/ipv4/ip_local_port_range ip_local_port_range = 1024 65000

In case your default kernel parameter is less than the above mentioned parameters then you will have to change them. This is how you can add or change these parameters:
Add the following lines in sysctl.conf

# vi /etc/sysctl.conf kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.rmem_max=262144 net.core.wmem_default=262144 net.core.wmem_max=262144
Run the following command to refresh the kernel parameters just added
# sysctl -p
To view all the kernel parameters
# sysctl -a
Add the following lines to the “/etc/security/limits.conf” file.
* soft nproc 2047 * hard nproc 16384 * soft nofile 1024 * hard nofile 65536
Add the following line to the “/etc/pam.d/login” file, if it does not already exist.
session    required

  • RPM pre-requisites

Make sure the following rpm version is equal or greater installed in your machine
gcc-3.4.4-2 gcc-c++-3.4.4-2 libstdc++-devel-3.4.4-2 libgcc-4.1.2-50 cpp-3.4.4-2 compat-libf2c-34-3.4.6-4.1 compat-libcom_err-1.0-7 glibc-2.3.4-2.13 glibc-common-2.3.4-2.13 glibc-devel-2.3.4-2.13 glibc-headers-2.3.4-2.13 gnome-libs- compat-db-4.1.25-9 sysstat-5.0.5-1 libaio-0.3.103-3 openmotif21-2.1.30-11 xorg-x11-deprecated-libs-6.8.2-1 compat-libstdc++-33-3.2.3-47.3 make-3.80-5libXp-1.0.0

  • User and Group

You have to create a different user and group who will run the database

# useradd oracle # groupadd dba # usermod -G dba oracle

So we have added oracle user to dba group using the above command.

  • Create home directory

# mkdir -p /u01/oracle/product/10.2.0/db_3/ # mkdir /u01/oraInventory # chown -R /u01 # chmod -R oracle:dba /u01We will use the standard format for creating the oracle database. Create a directory with the name used above.

  • Specify the Display protocol

Log in to oracle user

# su – oracle $ export $DISPLAY=localhost:0.0

NOTE: In case you get DISPLAY related errors at the installation stage follow this page
How to specify DISPLAY protocol

  • Installation

Go to the location where you have downloaded and unzipped the database setup file using oracle user

# su – oracle
$ cd /database10gr2/database/ $ ./runInstaller
You will get the below screen. Change the Oracle Home location as the directory row created in “Create Home Directory” section of this blog

(Click on the images in case you find trouble reading the texts)
Give database password in the provided section

Give the directory path as mentioned below

Make sure you get “Succeeded” in all the pre-requisite section. In case you get a failure at any of the parameter, Re-check the failed parameter and it is advised not to move to next step until and unless all the  pre-requisite are “Passed

Click on Next and Finish the installation

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: