Tuesday, June 7, 2011

Installaing ORACLE 11G R2 in Centos 5 (Minimum requirement)


Pre-Instalation Tasks
1. Create oracle User Account

Login as root and create te user oracle which belongs to dba group.

su -
# groupadd dba
# useradd -g dba oracle
# passwd oracle - give password

2. Setting System parameters -for 4+ GB RAM

Edit the /etc/sysctl.conf and add following lines:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.aio-max-nr = 1048576

2. Setting System parameters -for 2 GB RAM
kernel.shmall = 2097152
kernel.shmmax = 1258291200
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 8388608
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max =4194304
net.core.wmem_default = 262144
net.core.wmem_max = 2097152
fs.aio-max-nr = 1048576

Note: You need reboot system or execute "sysctl -p" command to apply above settings.

For RedHat (OEL, Centos) 5 version: Edit the /etc/pam.d/login file and add following line:
session required pam_limits.so

Edit the /etc/security/limits.conf file and add following lines:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

3. Creating oracle directories
# mkdir /opt/oracle
# mkdir /opt/oracle/db_1
# chown -R oracle:dba /opt/oracle

Must Log in as oracle user

4. Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile file and add following lines:


Save the .bash_profile and execute following commands for load new enviroment:
cd /home/oracle
. .bash_profile

1. Download and install required .rpm packages

Login as Root user in terminal

Some additional packages are required for succesful instalation of Oracle software. To check wheter required packages are installed on your operating system use following command:

rpm -q binutils elfutils elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel compat-libstdc++-33 cpp make compat-db sysstat libaio libaio-devel unixODBC unixODBC-devel|sort

We get the list of not installed packages

package compat-db is not installed
package compat-libstdc++-33 is not installed
package elfutils is not installed
package gcc-c++ is not installed
package gcc is not installed
package glibc-devel is not installed
package libaio-devel is not installed
package sysstat is not installed
package unixODBC-devel is not installed
package unixODBC is not installed

Give the following command to install each of them

# yum install compat-db
# yum install elfutils

giving permission to oracle installation folder and the home folder at time of installation.

# chmod -R 777 /opt/oracle11g/

# chmod -R 777 /opt/

Logout and Login in GUI as Oracle User

Go to the Instalation setup file path and execute the following command


Post-Instalation Tasks
1. (Optional) Auto Startup and Shutdown of Database and Listener

Login as root and modify /etc/oratab file and change last character to Y for apropriate database.

As root user create new file "oracle" (init script for startup and shutdown the database) in /etc/init.d/ directory with following content:

# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
# chkconfig: 35 80 30
# description: Oracle Database startup script

# Source function library.

. /etc/rc.d/init.d/functions


case "$1" in
echo -n $"Starting Oracle DB:"
echo "OK"
echo -n $"Stopping Oracle DB:"
echo "OK"
echo $"Usage: $0 {start|stop}"

Execute (as root) following commands (First script change the permissions, second script is configuring execution for specific runlevels):

chmod 750 /etc/init.d/oracle
chkconfig --add oracle --level 0356

No comments:

Post a Comment