Oracle 11gR2 Installation On Redhat Linux 5
This article covers step-by-step installation of Oracle 11g R2 database software on Redhat Enterprise Linux 5 or Enterprise Linux 5 shipped by Oracle Corporation.
Pre-Installation Requisites
1. Create oracle User Account and Directories
As a root user create oracle user and groups: oinstall, dba, asmdba and asmadmin.
#groupadd dba
#groupadd oinstall
#groupadd asmdba
#groupadd asmadmin
#useradd -g oinstall -G dba asmdba asmadmin oracle
Create the directories in which the Oracle software will be installed:
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01
2. Setting System parameters
Add following lines to /etc/sysctl.conf file.
#vi /etc/sysctl.conf
The shmall parameter defines the maximum amount of shared memory that may be in use at any time on the system
kernel.shmall = 2097192
kernel.shmmax = 536870912
The shmmni parameter defines the maximum number of shared memory segments across the system
kernel.shmmni = 4096
semaphores: semmsl, semmns, semopm, semmni
Here ,
semmsl: Maximum number of semaphores per set
semmns: Total number of semaphores in the system
semopm: Maximum number of operations per semop call
semmni: Maximum number of semaphore sets
semmns: Total number of semaphores in the system
semopm: Maximum number of operations per semop call
semmni: Maximum number of semaphore sets
kernel.sem = 250 32000 100 128
Maximum no of open files on Linux
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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=1048576
Now run the sysctl-P command to apply above settings to change the current kernel parameters.
#/sbin/sysctl -p
Add following line to /etc/pam.d/login file.
#vi /etc/pam.d/login
session required pam_limits.so
To set system resource limits edit the /etc/security/limits.conf file and add following lines.
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3. Set Oracle Environment
Login as the oracle user and add the following lines at the end of the .bash_profile file.
#su oracle
$vi ~/.bash_profile
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=localhost.oracle.com; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHif [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Save the .bash_profile file and run following commands to load new environment.
#cd /home/oracle
. .bash_profile
Now check current status of SELinux:
#/usr/sbin/getenforce
If the output is “Enforcing” then change mode to “Permissive” using following command:
#/usr/sbin/setenforce 0
To have this change after next reboots modify the /etc/sysconfig/selinux and change the value of SELINUX to permissive or disabled:
SELINUX=permissive
Download & Install
1. Download and install required .rpm packages
For successful installation of oracle on Linux some additional packages are required.
Install the following packages.
Install the following packages.
#cd /media/cdrom/Server
#rpm -Uvh setarch-2*
#rpm -Uvh make-3*
#rpm -Uvh glibc-2*
#rpm -Uvh libaio-0*
#pm -Uvh compat-libstdc++-33-3*
#rpm -Uvh compat-gcc-34-3*
#rpm -Uvh compat-gcc-34-c++-3*
#rpm -Uvh gcc-4*
#rpm -Uvh libXp-1*
#rpm -Uvh openmotif-2*
#rpm -Uvh compat-db-4*
2. Extract downloaded software of the Oracle 11g release 2from Oracle website
#unzip linux.x64_11gR2_database_1of2.zip
#unzip linux.x64_11gR2_database_2of2.zip
3. Start the Oracle software installation process
Now the system is prepared for Oracle software installation. Log into the oracle user and Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory
$cd ~oracle/orainstall/oraclefolder
$cd database
$./runInstaller