Installing Oracle 11g in RHEL 5

  1. Checking the network setup:
a.       Verify the hostname (Issue command hostname)
b.      Change the current hostname in kernel
sysctl kernel.hostname=NEW_HOSTNAME
2.      Editing Hostname /etc/hosts
            localhost.localdomain localhost
      ::1            localhost6.localdomain6 localhost6
      192.168.x.x   fullhostname       hostname
3.      All necessary prerequisites will be performed automatically.
If you plan to use the “oracle-rdbms-server-11gR2-preinstall” package to perform all your prerequisite setup, follow the instructions at to setup the yum repository for OL, then perform the following command.
        # cd /etc/yum.repos.d
        # mv Oracle-Base.repo Oracle-Base.repo.disabled
        # wget
        # yum list
  # yum install oracle-rdbms-server-11gR2-preinstall
        # yum install oracle-validated
4.       Manual Configuration.
4.1   Add the following lines to the /etc/security/limits.conf file:
      oracle              soft    nproc   2047
      oracle              hard    nproc   16384
      oracle              soft    nofile  4096
      oracle              hard    nofile  65536
      oracle              soft    stack   10240
4.2   Edit /etc/selinux/config file and disable SELINUX
5         Create the new groups and users:
      groupadd -g 501 oinstall
      groupadd -g 502 dba
      groupadd -g 503 oper
      useradd –u 502 -g oinstall -G dba oracle
      passwd oracle
6         Create the directories in which the Oracle software will be installed:
      mkdir -p /u01/app/oracle
      chown -R oracle.oinstall /u01
7         Login as root and issue the following command:
      xhost +
8         Edit /home/oracle/.bash_profile from oracle user as:
export ORACLE_HOSTNAME=hostname;
export ORACLE_UNQNAME=orclunq;
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;
export ORACLE_SID=orcl;
export PATH==$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/sbin:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
9         Unzip Installer of Oracle Database
                # unzip
      # unzip
10     Start the Oracle Universal Installer (OUI) by issuing the following command in the database  directory:
      # ./runInstaller
11     Fix the RPM issues and Kernel Parameters as suggested
12     Follow the GUI generated by OUI to complete the installation according to requirement.
13     Install Only Software, By choosing Setup Wizard.
14     After installation of software create database with command
      # dbca
14.1.1      While setting Memory Parameter, Check off the Automatic Memory Management Check Box and choose Set SGA/PGA with Needs

HostName greater than 32 Character

When your server’s hostname exceeds 32 character, then there might have an issue of creating or Running enterprise Manager repository.
for a solution here are the steps to follow.
got to folder $ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/self_monitor$ cd $ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/self_monitor

backup the sqlfile self_monitor_post_creation.sql to any other name incase you need it.
$ cp self_monitor_post_creation.sql self_monitor_post_creation_bk.sql

and edit word “l_host_name  varchar2(32)” to “l_host_name  varchar2(50)” in 2 places of self_monitor_post_creation.sql file

and recreate the enterprise manager repository
 $ emca -config dbcontrol db -repos recreate