Monday, April 25, 2011


This is a step by step Oracle Installation , which will helps in  installation of Oracle 10g on RHEL 5.1 (Red Hat Enterprise Linux 5.1)  32-bit architecture.

Step  1 :  The first thing we need to verify is  the hardware for an Oracle 10g Installation.

  Ø           Check Physical RAM.
                # grep  MemTotal   /proc/meminfo
                   MemTotal :      2075424 kB
 We need at least 1024 MB of physical RAM.  In my case I have 2048 MB.

Ø           Check Swap Space.
              # grep  SwapTotal    /proc/meminfo
                      SwapTotal:     3148732 kB
The following is Oracle's requirement for swap space:
Available RAMSwap Space Required
Between 1 GB and 2 GB1.5 or 2  times the size of RAM
Between 2 GB and 8 GBEqual to the size of RAM
More than 8 GB.75 times the size of RAM
Ø       Check space available in /tmp
           # df  -h  /tmp
              Filesystem            Size     Used         Avail     Use%     Mounted on
              /dev/sda5             1.5G     35M         1.4G      3% /        tmp
We need to have at least 400 MB of space in the /tmp directory.  Make sure we have 400MB in the column "Avail" in the above output.
  In my case I have 1.4G space available in /tmp.

Ø    Check space for Oracle Software and pre-configured database.
 I have created a separate partition "/u01" for Oracle Software  and database files.
             # df -h /u01
               Filesystem            Size        Used        Avail    Use%   Mounted on
               /dev/sda2              15G     166M         14G       2%        /u01

I  have 14G available space on the partition /u01.  Space requirement for Oracle Software:
     Enterprise Edition         2.5G
     Standard Edition           2.3G
     Custom (maximum)      3G

Once all hardware requirements are verified, we will proceed with further configuration.Make sure that there is an entry in /etc/hosts file for your machine like this:
[IP-address]   [fully-qualified-machine-name]   [machine-name]
Where "fully-qualified-machine-name" is your  "machine_name"."domain_name"

Step 2 :  Before start installing Oracle10g software, make sure that we have the below packages installed on our Linux box,  else we will get error(s) during the installation process.

Execute the below comand as root to make sure that we have this rpms installed. If not installed, then download them  from appropriate linux site. For example ,
# rpm -qa  | grep glib*
The above command will display all the installed packages, name starting with  glib,  similarly we can check for all others packages .

If any of the above packages are  not installed, run the following command:
# rpm -ivh </path/to/><version>.i386.rpm
we will find the  package from the Red Hat Enterprise Linux 5 DVD .

Step 3 : Create user for Installation  :
We need  OS  “oracle”  user account created which owns the Oracle software. Oracle Software installation needs to be proceeds by this account for installing and managing. We do not need oinstall group if we are not installing on the production server or we (or our team) are the only person responsible for future installations/upgrades of Oracle Software. Members of the dba group can administer Oracle databases, for example starting up and shutting down databases. The oinstall group is often needed for those organizations who have separate groups that maintain the software and the database. In this scenario, the group membership prevents unauthorized access to the database by personnel who maintain the software, and it prevents the database administrators from making changes to the software and the installations inventory directory.

 # su -
#  groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba oracle
# passwd oracle
<<Enter password>>

Step 4:    Setting System parameters
Kernel Parameters : Oracle recommends that we set shared memory segment attributes as well as semaphores to the following values. If not set, database instance creation will fail.. Every OS process needs semaphore where It waits on for the resources. I added the following lines to /etc/sysctl.conf file. For more about the kernel parameter click here
Add/change the appropriate variables value in the   /etc/sysctl.conf  file as shown below.

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
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
After adding these lines to /etc/sysctl.conf, run the below command as root to make them enabled.
 #  sysctl  -p

Step 4: Edit the /etc/pam.d/login file and add following line
session required

Step 5:   Edit the /etc/security/limits.conf file
To improve the performance of the software on Linux systems, we 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
Where "nproc" is the maximum number of processes available to the user and "nofiles" is the number of open file descriptors.

Step 6 : Creating oracle directories
As 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, we could choose another mount point directory,  such as /oracle or /opt/soft.

# mkdir  -p /u01/app/oracle
# chown  -R  oracle:oinstall  /u01/app/oracle
#mkdir  -p   /u02/oradata/db102
# chown  -R  oracle:oinstall /u02/oradata/db102
# chmod  -R  775  /u01/app/oracle
# chmod  -R  775  /u02/oradata/db102

Step  7:   Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile  file and add following lines:
TMP=/tmp; export TMP
# If /tmp doesn't have 400mb space free then you can workaround it
# by pointing the variables TMP AND TMPDIR to a location where you
# have sufficient space. Oracle will then use this directory for
# temporary files.
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
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

Step 8:   Release specification 
Oracle 10g is not certified to be installed on RHEL 5, therefore, it runs a check on the operating system when the installer starts and will bounce back with an error if the redhat release is not redhat-4 or redhat-3 etc. Open /etc/redhat-release, remove whatever release is specified over there and put this:  redhat-4.

Step 9:   Installation Process of Oracle 10g Software
#  xhost +     (access control disabled, clients can connect from any host)
# mount  /media/cdrom    (--- if u have your s/w in cd else no need of this steps ) 
# su - oracle
$ echo $ORACLE_SID
$ ./media/cdrom/runInstaller
The OUI (Oracle Universal Installer) should start and we should see graphical screens and install as per requirements.

Note:  Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:  SELINUX=disabled . If we  leave SELINUX=enforcing then we may get an error later while starting sqlplus:

Enjoy         : -) 


Beta said...

I have just installed Oracle 10g on my Redhat, thank you for this install guide.

goutham said...

neeraj.good work

goutham said...

Hi Neeraj.
good work

Joseph A. Wallace said...

Thanks for Information Oracle 10g/11g Database Administration In this course, you will explore how an Oracle Database applies ‘grid computing’ to multiple computers to provide fast, efficient, secure data storage and manipulation that easily scales to thousands of clients. You will learn how to install, administer, and maintain an Oracle 10g or 11g database in an effective and efficient manner. You will cover the interaction among Oracle components, Oracle’s architecture, and user management. Performance monitoring, database security, and backup and recovery techniques are covered. This course will assist those preparing to take the Oracle Certified Associate (OCA) certification examination.Oracle 10g / 11g DBA Online Training

Path Infotech said...

Thanks for sharing the information

Oracle DBA Certification

Path Infotech said...

Thanks for sharing the information

For more info : Oracle Certification Courses