Wednesday, April 29, 2009

Install Oracle Database 10g on LINUX (RHEL 4)

Installing Oracle 10g (10.2.0.1) on RHEL 4

This part is need to be done by root user only.

create groups
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba

create OS user oracle with group permissions and home /home/oracle
/usr/sbin/useradd -g oinstall -G dba -d /home/oracle oracle

set user oracle's password
/usr/bin/passwd oracle
give the password you need.

Append user oracle's bash profile with PATH and ORACLE:BASE,HOME and SID information vi /opt/oracle/.bash_profile
umask 022
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10gR2
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
export PATH LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME ORACLE_SID

Create the directory for the software installation and assign ownership to oracle:oinstall
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Make sure the correct kernel parmeters are added to sysctl.conf

vi /etc/sysctl.conf (these can be easily copied from the Quick Installation Guide for Linux x86 doc on the Oracle10g CD)
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

reboot to apply the changes made to kernel parameter, or
/sbin/sysctl -p

Login in to xwindows session as user oracle

Download the Oracle 10g appropriate software from download.oracle.com website.

Unzip the software using 'unzip' Linux command. It will create a directory.

Please go through the readme first. There are some rpm (RedHat Package Manager) files that needs to be installed first.
Download the appropriate packages.
http://rpm.pbone.net/
http://rpmfind.net/

Install those packages as following (OS user must be 'root' user)
# rpm -Uvh (RPM package name)

@@ Here 'U' stand for upgrading an RPM package. 'i' is used to install & 'q' is used to query.

Now login to GUI as OS user 'oracle', go to unzipped folder and execute
$ ./runInstaller

Continue the steps & create the database.