Saturday, July 31, 2010

Oracle 11gR2 Installation on RHEL 5.0

Oracle 11gR2 Installationon RHEL 5.0

Physical RAM:
# grep MemTotal /proc/meminfo
1805312

Swap Memory:
# grep SwapTotal /proc/meminfo
4096532 kb

#mkdir /u01



Creating /u01 File System
Fdisk /dev/sda
Command:n
First cylinder:
Last cylinder:+27g
Command:w
#partprobe /dev/sda13
#Mkfs.ext3 /dev/sda13

Mounting File System

#Mount /dev/sda13 /u01
#Vi /etc/fstab
/dev/sda13 /u01 ext3 defaults 1 2

#df –h /u01

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 27G 166M 26G 2% /u01


#Vi /etc/hosts
192.168.1.1 ecs01.ecsme.com ecs01 ecs01
#Vi /etc /sysconfig/network
Hostname=ecs01.ecsme.com
Neat-tui
Static ip 192.168.1.1
Netmask:255.255.255.0
#service network restart

# uname -r
2.6.18-194.el5xen


Adding Linux Kernel Parameters to support Oracle

#vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
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
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

Note: we 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 it is safe to leave it as it is.

Make the kernel parameters changes effective immediately:

# /sbin/sysctl -p

Creating groups and oracle user
#/usr/sbin/groupadd oinstall
#/usr/sbin/groupadd dba
#/usr/sbin/groupadd oper

#/usr/sbin/useradd -g oinstall -G dba,oper –d /u01 oracle

#/usr/bin/passwd oracle
Passwd:oracle

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

#mkdir -p /u01/app/oraInventory
#chown -R oracle:oinstall /u01/oraInventory
#chmod -R 775 /u01

Shell limits for the user Oracle
#vi /etc/security/limits.conf
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.

#vi /etc/pam.d/login
session required pam_limits.so
#vi /etc/selinux/config
SELINUX=disabled


Install necessary packages for Oracle.
Put the Linux Media into DVD and go to the "Server" directory.
For RHEL 5 (32-bit):

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5
libaio-0.3.106
libaio-0.3.106
libaio-devel-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-4.1.2
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11


#reboot

#xhost +

#su – oracle

$xclock (clock shld come)

$pwd
/u01

$echo $SHELL
/bin/bash

$vi .bash_profile
# .bash_profile
ORACLE_HOSTNAME=ecs01.ecsme.com
export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_HOME
ORACLE_SID=prd
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
umask 022

$cd /u01
$ls
linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip

$unzip linux_11gR2_database_1of2.zip
$unzip linux_11gR2_database_2of2.zip

$cd database/
$./runInstaller

Configuration Security updates – Next
Install database software only – Next
Single Instance Database Installation – Next
Product Language – English - Next
Enterprise Edition – Next
Installation Location
Oracle base=/u01/app/oracle
Oracle Home=/u01/app/oracle/product/11.2.0/db_1
Create Inventory
Inventory Directory=/u01/app/oraInventory
oraInventory group name = oinstall
Operating System Groups
Oracle dba =dba
OS oper = oper
Checking for Prerequistes – Next
Finish
Installation Begins


Execute the configuration scripts as root after installation.
#/u01/app/oraInventory/orainstRoot.sh
#/u01/app/oracle/product/11.2.0/db_1/root.sh


In the above if u get any errors check for the below
1.File system mounting
2.File Permissions
3.Make sure that Oracle Software is not corrupted and shld be supported by the machine.