ocp_logo Step By Step Instructions on Installing Oracle 9iR2 32-bit ( on  RedHat AS 3 x86 (RHEL3) / CentOS 3 x86
By Bhavin Hingu


Task List:

Pre-Installation Task:

Installing Required rpm (Packages)
Memory and Swap Space
Kernel Parameter
Creating oracle User account
Setting Shell limits for the oracle user

Set up OS Environment

Creating Oracle Software Directories
Setting up oracle User account

Obtaining 9iR2 Base Software (

Obtainging Extra patchsets

Installation Task:

Applying patch p3006854 to fix libcwait issue.
Installing Oracle 9i Base  Software (

Applying Patch p2617419 to install opatch utility

applying patch 3095277 to upgrade to

Applying Patch p3119415 for oracle Intelligent Agent

Post-Installation Task:

Creating Backup of the root.sh
Creating database Using following Storage Options
RawDevice Option
File System Option
Configuring new or Upgraded database


Before you start installing Oracle 9iR2 software, please make sure that you have the below packages installed on your Linux box,

        else you will get error(s) during the installation process.
         Kernel version :  2.4.21-4.EL

setarch-1.3-1           -- required for husgmem kernel.
Please execute the below comand as root to make sure that you have this rpms installed. If not installed, then download them
from appropriate linux site.

rpm -q glibc compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel openmotif21  setarch

Memory and swap Space:

Oracle Documents says that you need at least 512MB of memory and 1024MB of swap space (Double the size of memory if you have
RAM larger than 2 gigs) to run Oracle  (9i and above)  Database on Linux. Well, I have managed to successfully run one 9i and 2
10g instances (one ASM and one regular) simultaneously on a single linux box with 512 MB of memory. You simply need to adjust
the init.ora memory parameter for that

[root@shree root]# cat /proc/meminfo | grep Total
MemTotal: 515768 kB
HighTotal: 0 kB
LowTotal: 515768 kB
SwapTotal: 4192956 kB
VmallocTotal: 499704 kB

If you do not have enough Swap Space, you can add extra temporary swap space.

[root@shree root]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 40662492 5226432 33370508 14% /
none 257884 0 257884 0% /dev/shm
/dev/hdb1 9621848 3341000 5792072 37% /backup
[root@shree root]# mkdir /swap
[root@shree root]# cd /swap
[root@shree swap]# dd if=/dev/zero of=extraSwap bs=1024 count=128000
128000+0 records in
128000+0 records out
[root@shree swap]# chmod 600 extraSwap
[root@shree swap]# ls -l extr*
-rw------- 1 root root 131072000 Nov 28 14:16 extraSwap
[root@shree swap]# mkswap extraSwap
Setting up swapspace version 1, size = 131067 kB
[root@shree swap]# swapon extraSwap
[root@shree swap]# swapoff extraSwap

Kernel Parameters:

Oracle recommends that you set shared memory segment attributes as well as semaphores to the following values.
If not set, database instance creation will fail. I added the following lines to /etc/sysctl.conf file. Every OS process needs
semaphore where It waits on for the resources. For more on semaphore, please read the UNIX os documents.

 NOTE: If the current value for any parameter is higher than the value listed in this table, then do not change
              the value of that parameter.

                   To see the current setting in the kernel, please use the below command.

/sbin/sysctl -a | grep sem      -- for semmsl, semmns, semopm, semmni
/sbin/sysctl -a | grep shm      -- for
shmall, shmmax, shmmni
/sbin/sysctl -a | grep file-max

/sbin/sysctl -a | grep
/sbin/sysctl -a | grep rmem_default

Please add/change the appropriate variables value in the /etc/sysctl.conf file as shown below.

          net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
kernel.sysrq = 0
kernel.shmmax = 2147483648
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65536
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
            After adding these lines to /etc/sysctl.conf, please run the below command as root to make them enabled.
[root@shree root]# sysctl -p
                   Creating oracle OS User Account:

You need OS “oracle” user account created which owns the Oracle software. Oracle Software installation
needs to be proceeds by this account. Oracle software installation (without Companion CD) requires 2.5 GB
of free space available for the ORACLE_BASE directory. Please make sure that the mount point where you

        plan to install Software has required free space available. You can use “df –k” to check this out.

[root@shree ~]# df -k

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 40662492 5345128 33251812 14% /
none 257884 0 257884 0% /dev/shm
/dev/hdb1 9621848 3344928 5788144 37% /backup
I had about 33GB of free space available on “/” mount point. So I decided to install Oracle under this
mount point.

groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
passwd oracle

You do not need oinstall group if you are not installing on the production server or you (or your team) are the
only person
responsible for future installations/upgrades of Oracle Software.

Setting Shell Limits for the Oracle User:

To improve the performance of the software on Linux systems, you must increase the following shell limits
 for the
oracle user:

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

Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

                session required /lib/security/pam_limits.so

For the Bourne, Bash, or Korn shell,  add the following lines to the /etc/profile:

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


For the C shell (csh or tcsh), add the following lines to the /etc/csh.login.

       if ( $USER == "oracle" ) then
          limit maxproc 16384
          limit descriptors 65536


 Setup OS Environment:

Create the following symbolic links to put gcc296 and g++296 in the $PATH variable. These are required during the relink process of Oracle Software binaries.

		mv /usr/bin/gcc /usr/bin/gcc323
mv /usr/bin/g++ /usr/bin/g++323
ln -s /usr/bin/gcc296 /usr/bin/gcc
ln -s /usr/bin/g++296 /usr/bin/g++

Executing hostname should return the fully qualified name (hostname.domainname). Default setting is sufficent (localhost.localdomain) if you are installing for
experimental / learning purpose.

		[root@shree root]# hostname

Unset the java environment Variable if any.

Also make usre that oracle user does not have any installation related veriables set by default.

Creating Oracle Software Directories:

Asp per OFA, oracle base directory has the path: /mount_point/app/oracle_sw_owner where,
mount_point is the mount point directory for the file system that will contain the Oracle software. I have used
                     /u01 for the mount point directory. However, you could choose another mount point directory,
                     such as
/oracle or /opt/oracle.

        oracle_sw_owner is the operating system user name of the Oracle software owner, for example oracle.

[root@shree root]# mkdir -p /9i
[root@shree root]# chown -R oracle:oinstall /9i
root]# mkdir -p /u02/oradata/db920
root]# chown -R oracle:oinstall /u02/oradata/db920
[root@shree root]# chmod -R 775 /9i
[root@shree root]# chmod -R 775 /u02/oradata/db920

 Setup Oracle User Environment:

If you have more than one Oracle software installed on the machine, then you might want to create .bash_profile
for each oracle home. For e.g, I have two oracle software installed on my machine. I have created .bash_profile9i
for my 9i server and .bash_profile10g for my 10g server. I leave .bash_profile to its default. If you are going to
install Only 9i, then no need to create extra profile file.

		export ORACLE_BASE=/9i
export ORACLE_HOME=/9i/product/9.2.0
export ORACLE_SID=db920
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_ASSUME_KERNEL=2.4.19
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=xterm
export PATH=$PATH:$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/java/bin:.
export CLASSPATH=/9i/product/9.2.0/jdbc/lib/classes12.zip:/9i/product/9.2.0/JRE:/9i/product/9.2.0/jlib:/9i/product/9.2.0/rdbms/jlib:/9i/product/9.2.0/network/jlib:.

At this point you are ready to start Installing Oracle 9iR2.

Obtaining Oracle 9iR2 Base Software (

Goto otn.oracle.com and download the appropriate Oracle 9iR2 Software into the /tmp. Make Sure You have enough
space under this mount point. You can check this using df command. I downloaded following 3 files from OTN for my 32-bit Linux box
under the /tmp directory.

lnx_920_Disk[1 2 3].cpio.gz

You can download lnx_9204_Disk[1 2 3].cpio.gz instead.

I, then, used the below series of commands for each disk to unzip and uncompress it.

cd /tmp

gunzip  lnx_920_Disk1.cpio.gz
cpio -idmv <  lnx_920_Disk1.cpio

This will create 3 directory under /tmp named Disk1, Disk2 and Disk3. Optionally, you can write them on the CD.

[root@shree tmp]# mkisofs -r Disk1 | cdrecord -v dev=1,1,0 speed=20 -

Obtaining Extra 9i patchsets:

Along with the base software ( you also need to download and apply patchsets on top of the base release to fix most of the bugs
that comes with base release ( Please download the below patches from the http://metalink.oracle.com. If you are installing for
experimental / learning purpose then you do not need to apply those patches.

p3006854_9204_LINUX.zip: This patch builds /etc/libwait.so and ld.so.preload files. The second file is used to load the module
libcwait.so on every boot of OS. This is used to fix the below error generated by executing runInstaller.

Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2005-12-16_02-19-25AM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

p2617419_10102_GENERIC.zip: This patch supply the opatch utility which is used to apply oracle patch.
p3095277_9204_LINUX.zip: This patch is required to upgrade the database server to server.
p3119415_9204_LINUX.zip: This patch fixes the linking error during the installation of intelligent agent file: ins_oemagent.mk

        Installation Process of Oracle 9iR2 Softwares:

Applying p3006854_9204_LINUX.zip:

[root@shree root]# cd /tmp
[root@shree tmp]# unzip p3006854_9204_LINUX.zip
Archive:  p3006854_9204_LINUX.zip
   creating: 3006854/
  inflating: 3006854/rhel3_pre_install.sh
  inflating: 3006854/README.txt
[root@shree tmp]# cd 3006854
[root@shree 3006854]# sh rhel3_pre_install.sh
Applying patch...
Ensuring permissions are correctly set...
Patch successfully applied
[root@shree 3006854]# cp /etc/libcwait.so /lib/libcwait.so

Open /etc/ld.so.preload and replace the /etc/libcwait.so line by /lib/libcwait.so.
Before Edit it was /etc/libcwait.so and After edit, it is /lib/libcwait.so.

Installing Oracle 9iR2 Software

[root@shree root]# mount /mnt/cdrom
[root@shree root]# su - oracle
[oracle@shree oracle]$ echo $ORACLE_BASE
@shreeoracle]$ echo $ORACLE_SID
[oracle@shree oracle]$ export DISPLAY=shree.oracledba.org:0.0
[oracle@shree oracle]$ /mnt/cdrom/runInstaller

Follow these steps to install Oracle 9iR2 software.

Applying p2617419_10201_LINUX.zip:

[oracle@shree oracle]$ ls
[oracle@shree oracle]$ unzip p2617419_10102_GENERIC.zip
Archive:  p2617419_10102_GENERIC.zip
   creating: OPatch/
   creating: OPatch/docs/
  inflating: OPatch/docs/FAQ
  inflating: OPatch/docs/Users_G...
.. .. .. .. .. .. .. .. .. ..

[oracle@shree oracle]$  mv OPatch $ORACLE_HOME/

Update the $PATH variable in the .bash_profile file and add $ORACLE_HOME/OPatch in the path.

[oracle@shree oracle]$ which opatch

Applying p3095277_9204_LINUX.zip:

[root@shree root]# ls
[root@shree root]# unzip p3095277_9204_LINUX.zip

Optionally, you can write it on the CD.

[root@shree root]# mkisofs -r 3095277 | cdrecord -v dev=1,1,0 speed=20 -

Insert the newly burn cd into the cdrom and run the runInstaller as oracle like below.

[oracle@shree oracle]$ ls /mnt/cdrom1
install  oraparam.ini  rr_moved  runInstaller  stage
[oracle@shree oracle]$ /mnt/cdrom1/runInstaller

Follow these steps to apply patch.

Applying p3119415_9204_LINUX.zip:

Update the $PATH variable in the .bash_profile file and add $ORACLE_

[oracle@shree oracle]$ ls
[oracle@shree oracle]$ unzip p3119415_9204_LINUX.zip
Archive:  p3119415_9204_LINUX.zip
   creating: 3119415/
   creating: 3119415/files/
   creating: 3119415/files/network/
   creating: 3119415/files/network/lib/
  inflating: 3119415/files/network/lib/ins_oemagent.mk
   creating: 3119415/etc/
   creating: 3119415/etc/config/
  inflating: 3119415/etc/config/inventory
  inflating: 3119415/etc/config/actions
   creating: 3119415/etc/xml/
  inflating: 3119415/etc/xml/GenericActions.xml
  inflating: 3119415/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: 3119415/README.txt

[oracle@shree oracle]$ cd 3119415
[oracle@shree 3119415]$ opatch apply
Oracle Interim Patch Installer version
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..
We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com
Oracle Home = /9i/product/9.2.0
Location of Oracle Universal Installer components = /9i/oui
Location of OraInstaller.jar  = "/9i/oui/lib"
Oracle Universal Installer shared library = /9i/oui/bin/linux/liboraInstaller.so
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Inventory = /u01/app/oraInventory
Path to Java = /u01/app/jre/1.3.1/bin/java
Log file = /9i/product/9.2.0/.patch_storage/<patch ID>/*.log
Backing up comps.xml ...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Please shut down Oracle instances running out of this ORACLE_HOME
(Oracle Home = /9i/product/9.2.0)
Is this system ready for updating?
Please respond Y|N >
Updating inventory...
Backing up comps.xml ...
OPatch succeeded.

Creating Backup of the root.sh:

Oracle recommends that you back up the root.sh script after you complete an installation. If you install other products
in the same Oracle home directory, then Oracle Universal Installer updates the contents of the existing
root.sh script
during the installation. If you require information contained in the original
root.sh script, then you can recover it from
the backed up
root.sh file.

Creating Database Using Different Storage Options:

File system
Raw devices        

Configuring New or Upgraded Databases:

Oracle recommends that you run the utlrp.sql script after creating or upgrading a database to recompile all
PL/SQL modules that might be in an invalid state, including packages, procedures, and types. This is an optional
step but Oracle recommends that you do it during installation and not at a later date.



Oracle Documents