Zahid Karim
Recent Posts
1.Draw plus and cross sign into PDF via PLSQL using PL_FPDF
2.Draw Triangle directly into PDF via PLSQL using PL_FPDF
3.Write fast and efficient PLSQL - DBMS_PROFILER
4.Fix physically corrupt data blocks using PLSQL - DBMS_REPAIR
5.Encrypt or Decrypt sensitive data using PLSQL - DBMS_CRYPTO
Find me on
How to Install Red Hat Enterprise Linux 4 Install Oracle 11g Release 2 on RHEL 5

Install Oracle 10g Release 2 on RHEL 5

Posted by Zahid on April 5, 2010.

This is a step by step guide, which will walk you through the installation of Oracle 10g on RHEL 5.1 (Red Hat Enterprise Linux 5.1) 32-bit architecture.

The first thing we need to verify is, if the hardware we have is okay 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

 RAM up to 1024MB then swap = 2 times the size of RAM
 RAM between 2049MB and 8192MB then swap = equal to the size of RAM
 RAM more than 8192MB then swap size = 0.75 times the size of RAM
 Since my RAM is 2048MB, so I have 3072 MB of Swap Size.

-- Check space available in /tmp
# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             1.5G   35M  1.4G   3% /tmp

  You need to have at least 400 MB of space in the /tmp directory.
  Make sure you 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
  Space requirement for Oracle Database Files:
     1.2 G 
      creating a database is always optional with oracle installation. 
      Can be done later.

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

Next we need to adjust the Linux Kernel Parameters to support Oracle.
Open /etc/sysctl.conf and add the following lines:

# Oracle settings
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

Note: You may find the parameters mentioned above already present in the /etc/sysctl.conf file. If they have a value lower then mentioned above then make sure you change it, but if they have a larger value then perhaps its safe to leave it as is.

-- Make the kernel parameters changes effective immediately:
# /sbin/sysctl -p

-- Verify the parameters are changed or not? 
# /sbin/sysctl -a | grep name_of_kernel_parameter -- e.g. shmall

Now setup User that we will use as Oracle owner and the groups that it will need for installing and managing Oracle.

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
/usr/bin/passwd oracle

Create directories where the Oracle Software and database will be installed.

mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Now set the shell limits for the user Oracle.
Open /etc/security/limits.conf and add these lines.

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.

Open /etc/pam.d/login and add the following line if it is already not there.

session    required

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:


If you leave SELINUX=enforcing then you may get an error later while starting sqlplus:
sqlplus: error while loading shared libraries:
/usr/lib/oracle/default/client64/lib/ cannot restore segment
prot after reloc: Permission denied

Now we need to make sure we have all necessary packages for Oracle. Put your Linux Media into DVD and go to the "Server" directory.

cd /dvd_mount_point/Server

For RHEL 5 (32-bit):

rpm -Uivh binutils-2*
rpm -Uivh gcc-c++-4*
rpm -Uivh libgcc-4*
rpm -Uivh libstdc++-4*
rpm -Uivh libstdc++-devel-4*
rpm -Uivh setarch-2*
rpm -Uivh make-3*
rpm -Uivh glibc-2*`uname -p`*
rpm -Uivh libaio-0*
rpm -Uivh compat-libstdc++-33-3*
rpm -Uivh compat-gcc-34-3*
rpm -Uivh compat-gcc-34-c++-3*
rpm -Uivh gcc-4*
rpm -Uivh libXp-1*
rpm -Uivh openmotif-2*
rpm -Uivh compat-db-4*

For RHEL 5 (64-bit):

rpm -Uivh binutils-2*`uname -p`*
rpm -Uivh compat-db-4*`uname -p`*
rpm -Uivh compat-gcc-34-3*`uname -p`*
rpm -Uivh compat-gcc-34-c++-3*`uname -p`*
rpm -Uvih compat-libstdc++-33*`uname -p`*
rpm -Uvih compat-libstdc++-33*i386*
rpm -Uvih compat-libstdc++-296*i386*
rpm -Uvih gcc-4*`uname -p`*
rpm -Uvih gcc-c++-4*`uname -p`*
rpm -Uivh glibc-2*`uname -p`*
rpm -Uvih glibc-devel-2*i386*
rpm -Uvih glibc-devel-2*`uname -p`*
rpm -Uvih glibc-headers-2*`uname -p`*
rpm -Uvih kernel-headers-2*`uname -p`*
rpm -Uivh libaio-0*`uname -p`*
rpm -Uivh libgcc-4*`uname -p`*
rpm -Uvih libgomp-4*`uname -p`*
rpm -Uivh libstdc++-4*`uname -p`*
rpm -Uvih libstdc++-devel-4*`uname -p`*
rpm -Uvih libXp-1*i386*
rpm -Uvih libXp-1*`uname -p`*
rpm -Uivh make-3*`uname -p`*
rpm -Uivh openmotif-2*`uname -p`*
rpm -Uivh setarch-2*`uname -p`*
rpm -Uvih sysstat-7*`uname -p`*

NOTE: If you are using RHEL5 DVD then you should find them all in the "Server" directory in your DVD. And if you don't find one there you may download it from the Linux vendor's Web site.
If you have your Linux distribution in 3 CDs then these will be scattered on all three CDs in the Server directory on all CDs.

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:


The release specification that was in the /etc/redhat-release file, keep it somewhere safe as we will have to revert back the redhat-release file once Oracle Installation is complete. In my case it is "Red Hat Enterprise Linux Server release 5.1 (Tikanga)"

Allow the user oracle to use X server, which it will need to run Oracle Universal Installer.

# xhost +SI:localuser:oracle

Now switch to the user oracle.

# su - oracle

-- Let's see which shell is being used by the user Oracle.
$ echo $SHELL

If the returned shell is bash then open ~/.bash_profile and add these lines:

# Oracle settings
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
ORACLE_SID=ora10g; 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

If using C shell then open ~/.login and add these lines:

# Oracle settings
setenv TMP=/tmp
setenv TMPDIR=$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.

setenv ORACLE_BASE /u01/app/oracle
setenv ORACLE_HOME $ORACLE_BASE/product/10.2.0/db_1
setenv ORACLE_SID ora10g
setenv ORACLE_TERM xterm
setenv PATH /usr/sbin:$PATH

setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/lib:/usr/lib

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

Now run the following command to make these changes effective in the current session of user oracle.

-- for bash shell
$ source ~/.bash_profile
-- for C shell
$ source ~/.login

The environment is ready for oracle installation. Its time to prepare the oracle installation media now.
Download or Copy the oracle media to the oracle user home directory i.e. /home/oracle.
Once Download/Copy is done unzip the media as follows:

$ cd /home/oracle/
$ unzip

Once the unzip is finished go to the "database" directory unzipped in the previous step and start the Oracle Universal Installer.

$ cd /home/oracle/database/
$ ./runInstaller

The OUI (Oracle Universal Installer) should start and you should see following screens in the order given below:

1. Select the installation Method (Advanced or Basic). I usually select advanced here.

  • Select Installation Method
  • 2. Provide the Oracle Installation Inventory directory and the oracle installation group i.e. oinstall in our case. If you have properly configured your environment as suggested above you may leave this page to the defaults.

  • Inventory directory and credentials
  • 3. Select the installation type (Enterprise or Standard Edition or Custom Installation). Select "Enterprise Edition".

  • Select Installation Type
  • 4. Specify Oracle home for this installation. As we have set $ORACLE_HOME in our configuration before so it is picked up automatically by the installer.

  • Oracle Home
  • 5. Oracle will now perform pre-requisite checks. Make sure they all are executed and succeeded. If "Checking Network Configuration requirements" check is not executed, it should be fine. It will display a warning that your primary network interface should be configured using a static IP (not DHCP) for oracle to function properly. If this is true for your system just tick the checkbox against this check and you will se its status become "User Verified".

  • Product Specific Prerequisite Checks
  • 6. Select the configuration option. We want to create an oracle database with this installation and it will not be an ASM based installation so select "Create a database".

  • Select Configuration Option
  • 7. When we choose to create a database, this page shows up asking the database configuration. Choose the database type you wish to create.

  • Select Database Configuration
  • 8. Specify database configuration options e.g. database SID and characterset.

  • Specify Database Configuration Option
  • 9. Select whether you want to use Grid Control or Database Control with this database.

  • Select Database Management Options
  • 10. Select database storage options. File System, ASM or Raw Devices.

  • Specify Database Storage Options
  • 11. Choose your backup and recovery options.

  • Specify Backup and Recovery Options
  • 12. Provide passwords for database schemas. Different password for each user or one master password for all.

  • Specify Database Schema Passwords
  • 13. This is the installation summary. Review it and press "Install" to start the installation.

  • Installation Summary
  • 14. The installation started and will take several minutes.

  • Installation Progress
  • 15. Once the installation is complete the configuration assistants will start. They will configure the Oracle Net and the database itself.

  • Configuration Assistants
  • 16. This is the database configuration assistant (DBCA) which should automatically start from the Configuration Assistants screen in the Oracle Installer..

  • Database Configuration Assistant
  • 17. Once database creation is complete the DBCA will show you a summary about the database it created.

  • Database Summary
  • 18. Once the DBCA is complete oracle will then ask you to log in as root and execute two script.

  • Execute Configuration Scripts
  • Open another console and login as root. Execute following once logged in successfully.

    # /u01/app/oracle/oraInventory/
    Changing permissions of /u01/app/oracle/oraInventory to 770.
    Changing groupname of /u01/app/oracle/oraInventory to oinstall.
    The execution of the script is complete
    # /u01/app/oracle/product/10.2.0/db_1/
    Running Oracle10 script...
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of script.
    Now product-specific root actions will be performed.

    19. When configuration scripts are executed successfully by root press OK in the installer and you will this "End of Installation" page. Note down the management URLs and press "Exit".

  • End of installation
  • Now go ahead and revert back the /etc/redhat-release file to whatever it was before we started the installation.

    Red Hat Enterprise Linux Server release 5.1 (Tikanga)

    See also:
    How to Install Red Hat Enterprise Linux 5
    Create Virtual Machine using VMWare
    How to Install Red Hat Enterprise Linux 4
    Install Oracle 11g Release 2 on RHEL 5
    Install Oracle 11g Release 1 on RHEL 5