Wednesday, June 29, 2011

Installation Oracle 11g Rel2 on Linux Redhat 5.5

Before you start,you'll need to do the following steps

1- on the linux system (root user)
In order to avoid pre-requisite check problem, you must install the following packages;
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*

Most of these package will be on media 2,3 and 5

2- Add the following lines to the "/etc/sysctl.conf" file
a- vi /etc/sysctl.conf
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
b- update your sysctl.conf
# /sbin/sysctl -p

3- 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

# End of file
4- Add the following lines to the "/etc/pam.d/login" file
session required pam_limits.so

5- Disable secure linux by editing the "/etc/selinux/config", normal this parameter is setting to Enable

SELINUX=disabled

6- Create groups and user
groupadd -g 502 oinstall
groupadd -g 503 dba
useradd -u 504 -g oinstall -G dba oracle
passwd oracle

7- Add the following lines to oracle user profile
# vi /home/oracle/.bash_profile
umask 022

# User specific environment and startup programs

export ORACLE_BASE=/mnt/orc5/app/oracle/product/db

export ORACLE_HOME=$ORACLE_BASE/11.2.0/dbhome

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_TERM=xterm

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export CLASSPATH=$ORACLE_HOME/JRE

export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

export TEMP=/tmp

export TMPDIR=/tmp

8- check /etc/hosts
The hosts file must have the following lines
127.0.0.1 localhost.localdomain localhost
XXX.XXX.XXX.XXX full qualified domain name hostname
example
192.168.4.0 hamdy.blogspot.com hamdy

9- Start installation
In order to run teh GUI interface, you'll need an Xserver running on the Linux server ex. vncserver (I use vncserver)
a- on the linux server login as Oracle user
#/usr/bin/vncserever, vnc session will be started

b- on you local machine
You'll need vncviewer and Xserver

c- login as Oracle user on the vncviewer( hummingbird )
export DISPLAY to you local machine example
DISPLAY=:0.0; export Display
d- start the Xserver on you local-machine
f- check if you Display variable is okay,
# xclock, if everthing is okay, just go further to the following step

10- Move to the Oracle software location &unzip the files

11- runInstaller

12- #./runInstaller