Monday, July 16, 2012

Oracle 11g R2 installation (RHEL 5.4 x64)

This articles describes the step-by-step installation procedure of Oracle 11g Release 2 ( on RHEL 5.4 (x64) operating system.

1. Environment details
››  Operating System: RHEL 5.4 (x64)
››  Physical memory used: 4G
››  Swap memory used: 8G
››  Oracle Release 11g (
››  Hostname: (
››  Database Name [DB_NAME]: 'dbuat01'
››  Database domain [DB_DOMAIN]: ''
Additional Notes:
To determine the physical RAM, issue the following command:
$ grep MemTotal /proc/meminfo

To determine the size of the configured SWAP space, issue the following command:
$ grep SwapTotal /proc/meminfo

Swap memory used: 8G. However equal size can be assigned. For example,
Between 1024M and 2048M: 1.5 times the size of RAM
Between 2048M and 8192M: Equal to the size of RAM
More than 8192M: 0.75 times the size of RAM
2. Oracle Software dump

Download these files from Oracle site.

Unzip the files
$ unzip
$ unzip
3. Configuring the host

i) Modify '/etc/hosts' and must contain a fully-qualified name of the host server.

<ip-address> <fully-qualified-machine-name> <machine-name>

ii) Setting kernel parameters

Add the following entries in '/etc/sysctl.conf' file.

kernel.shmmax = 68719476736 /* it's usually, 1/2 of physical RAM */
kernel.shmall = 4294967296 /* it's usually, <physical RAM> / <pagesize> */
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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

Make the changes as permanent using:
$ /sbin/sysctl -p
Add the following lines to '/etc/security/limits.conf' file.

*     soft     nproc      2047
*     hard     nproc      16384
*     soft     nofile     4096
*     hard     nofile     65536

Add the following line to '/etc/pam.d/login' file.

session     required

Disable secure Linux by editing the '/etc/selinux/config' file.

4. Dependency Package installation
Mount the RHEL 5.4 DVD or .iso image
$ mount /dev/cdrom /mnt
$ vi /etc/yum.repos.d/rhel-debuginfo.repo
name=Red Hat Enterprise Linux $releasever - $basearch - Debug

This ensures that the mounted DVD will be used as package repositories. Then, go ahead and install the following minimum recommended packages.
binutils- (x86_64)
compat-libstdc++-33-3.2.3-61 (x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
elfutils-libelf-0.125-3.el5 (x86_64)
glibc-2.5-24 (x86_64)
glibc-2.5-24 (i686)
glibc-common-2.5-24 (x86_64)
ksh-20060214-1.7 (x86_64)
libaio-0.3.106-3.2 (x86_64)
libaio-0.3.106-3.2 (i386)
libgcc-4.1.2-42.el5 (i386)
libgcc-4.1.2-42.el5 (x86_64)
libstdc++-4.1.2-42.el5 (x86_64)
libstdc++-4.1.2-42.el5 (i386)
make-3.81-3.el5 (x86_64)

For example,
$ yum install binutils- (x86_64)

Also the following RPMs mut be installed.
RPM package installation:
$ rpm -ivh elfutils-libelf-devel-0.125-3.el5.x86_64.rpm elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
$ rpm -ivh glibc-headers-2.5-24.x86_64.rpm
$ rpm -ivh kernel-headers-2.6.18-92.el5.x86_64.rpm
$ rpm -ivh glibc-devel-2.5-24.x86_64.rpm
$ rpm -ivh glibc-devel-2.5-24.i386.rpm
$ rpm -ivh gcc-4.1.2-42.el5.x86_64.rpm
$ rpm -ivh libgomp-4.1.2-42.el5.x86_64.rpm
$ rpm -ivh libstdc++-devel-4.1.2-42.el5.x86_64.rpm
$ rpm -ivh gcc-c++-4.1.2-42.el5.x86_64.rpm
$ rpm -ivh libaio-devel-0.3.106-3.2.x86_64.rpm
$ rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm
$ rpm -ivh sysstat-7.0.2-1.el5.x86_64.rpm
$ rpm -ivh unixODBC-2.2.12.x86_64.rpm
$ rpm -ivh unixODBC-2.2.12.i386.rpm
$ rpm -ivh unixODBC-devel-2.2.12.x86_64.rpm
$ rpm -ivh unixODBC-devel-2.2.12.i386.rpm
5. Adding groups and user
Adding groups and user:
$ groupadd oinstall
$ groupadd dba
$ groupadd oper
$ useradd -g oinstall -G dba ora11g
$ passwd ora11g
6. Creating Oracle software directory structure

Create the directories in which the Oracle software will be installed.
Oracle directory structure:
$ mkdir -p /u01/app/oracle/product/11.2.0/db_1
$ chown -R ora11g:oinstall /u01
7. Oracle environment settings

Login as 'ora11g' user and add the following lines at the end of '~/.bash_profile'
TMP=/tmp; export TMP
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
PATH=/usr/sbin:$PATH; export PATH

if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
      ulimit -u 16384
      ulimit -n 65536
      ulimit -u 16384 -n 65536
8. Starting installation

Login as root and issue the following command:
GUI server access
$ xhost +rhel5401  /* rhel5401 is the machine name */

Edit '/etc/redhat-release' file, replace the current release information ('Red Hat Enterprise Linux Server release 5.4 (Tikanga)' with the following:


Login as 'ora11g' user in GUI mode. Open the terminal and export the following DISPLAY environment variable.
Setting DISPLAY environment:
$ DISPLAY=rhel5401:0.0; export DISPLAY

Logout and login again as 'ora11g' in GUI mode. Start the installation and proceed with the desired configurations.
Execute the script:
$ ./runInstaller -ignoreSysPrereqs
9. Post installation

Modify '/etc/redhat-release' file and restore the original release information.

Red Hat Enterprise Linux Server release 5.4 (Tikanga)

Add the Oracle SID and it's home in '/etc/oratab' file.

Last modified: Jul 16, 2012 13:30 IST