Thursday, March 5, 2009

Installing Oracle 10g R2 on RHEL 5

Hi guyes,

This article will discuss the installation process to Install Oracle Database 10g R2 on Red Hat Enterprise Linux 5 (RHEL5).

This article is based on server installation, with SE linux disabled and following group packages installaed:

* GNOME Desktop Environment
* Editors
* Graphical Internet
* Text-based Internet
* Development Libraries
* Development Tools
* Legacy Software Development
* Server Configuration Tools
* Administration Tools
* Base
* Legacy Software Support
* System Tools
* X Window System

The following steps instruct you to install oracle and set kernel parameter required to work oracle safely.

Download database software:- Download database software for oracle 10g R2 from OTN or Metalink.

Unzip the files in a directory

tar -zxvf 10201_database_linux.tar.gz

Say we are unzipping this tar file in /temp/oracle directory.

Edit the /etc/host file by adding following lines with specifications



Example:- 192.168.0.200 dbserver.test.com dbserver

Set kernel Parameters:- By adding following lines in /etc/sysctl.conf file

***********************************************************************************************************************************************

#kernel.shmall = 2097152

#kernel.shmmax = 2147483648

kernel.shmmni = 4096

#semaphores: semmsl, semmns, semopm, semmni

kernel.sem = 250 32000 100 128

#fs.file_max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

***********************************************************************************************************************************************

As the kernel parameters are set, run the following command to change the current parameters:

/sbin/sysctl -p

Edit the /etc/security/limits.conf file by adding following lines to it:

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

Add the following lines to /etc/pam.d/login file, if it does not already exist

session required /lib/security/pam_limits.so

Disable SELINUX by editing flag as follows in /etc/selinux/config file,

SELINUX=disable

Now all the prerequisite are set. We are going to start a database installation, but before that check whether following packages are installed or not:

To check whether package is installed execute following command as root:

rpm -qa | grep

This will give you the output and package version and name if installed. If package version is lower that what we need, then insert media of RHEL 5 and execute following command as root:

rpm -Uvh

List Of Packages:
binutils
setarch-2*
make-3*
glibc-2*
libaio-2*
compat-libstdc++-33-3*
compat-gcc-34-3*
compat-gcc-34-c++-3*
gcc-4*
libxp-1*
openmotif-2*
compat-db-4*
control-center
glibc-common
gnome-libs
libstdc++-devel
pdksh

As the all packages are installed, create the new groups and users:

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba oracle
passwd oracle

With this command enter new password for oracle.

Now create the directories where oracle software will be installed

mkdir -p /u01/product/server/db_1
chown -R oracle.oinstall /u01

In this way we created directories and make oracle the owner.

Now login as root user and issue this command

xhost +

Edit the /etc/redhat-release file replacing the current release information (Red Hat Enterprise Linux Server 5 (Tikanga)) with following:

redhat-4

Now login as oracle user and ad the following lines to /home/.bash_profile file at the end

*********************************************************************************************************************************************

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/product; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/server/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
*********************************************************************************************************************************************

Now execute following command

DISPLAY=:0.0; export DISPLAY

By navigating to oracle bib directory in $ORACLE_HOME execute

./runinstaller

Hope this will help you to install oracle on Linux system.....

2 comments:

  1. This post helps you install Oracle 10g R2 on RHEL 5. The steps given to install Oracle 10g R2 are easy. You can understand them with no difficulty. I think steps are explained with exact definition. Thanks for the useful information.

    ReplyDelete
  2. Thanks for the step by step guide. It was useful in installing my ERP system based on Oracle DB

    ReplyDelete