Wednesday, August 17, 2011

Oracle-10g Installation on RHEL-5

Step-1: Create following groups and users


# groupadd oinstall

# groupadd dba

# groupadd oper

Step-2: Create user

# useradd –g oinstall –G dba oracle

Step-3: Create following directories and then change mode and ownership

# mkdir –p /u01/app/oracle/product/10.2.0

# chmod –R 777 /u01

# chown –R oracle:oinstall /u01

Step-4:

# vi /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

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.wmem_default=262144

net.core.rmem_max=262144

net.core.wmem_max=262144

Step-5:

# sysctl –p

Step-6:

# vi /etc/security/ limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

Step-7:

# vi /etc/pam.d/login

#%PAM-1.0

auth required pam_securetty.so

auth required pam_stack.so service=system-auth

auth required pam_nologin.so

account required pam_stack.so service=system-auth

password required pam_stack.so service=system-auth

# pam_selinux.so close should be the first session rule

session required pam_selinux.so close

session required pam_stack.so service=system-auth

session optional pam_console.so

# pam_selinux.so open should be the last session rule

session required pam_selinux.so multiple open

session required /lib/security/pam_limits.so

session required pam_limits.so


Step-8:

# vi /home/oracle/ .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME

ORACLE_SID=PRODLAP; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

PATH=$ORACLE_HOME/OPatch:$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

export PATH

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksn" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

Step-9:

# passwd oracle

Enter 'oracle' until you get the # prompt.

Step-10:

# vi /etc/redhat-release

In this file you get whatever is written you have to delete that line and have to write redhat-4

Step-10:

Logout from root user and login as an Oracle User

Step-11:

Open new terminal and at oracle $ prompt execute runInstaller from oracle setup.