Tuesday, June 2, 2009

Installing Oracle Database on Redhat Linux

Installing Oracle RDBMS on Redhat linux linux

Note: This document does not replace the Oracle Install guide.

1. Create the Oracle Groups and User Account

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
/usr/sbin/useradd -m -g oinstall -G dba,oper oracle

2.
Set the password on the oracle account:
passwd oracle
3.

cat >> /home/.bash_profile <export PS1='{'$(hostname)':'$LOGIN'}$PWD ->'
set -o vi
stty erase ^?
umask 022
export ORACLE_BASE=/oracle/product
export ORACLE_HOME=$ORACLE_BASE/102_64
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
export TNS_ADMIN=$ORACLE_HOME/network/admin
export DISPLAY=192.168.0.27:0.0
alias oh='cd $ORACLE_HOME'
alias sql='sqlplus "/ as sysdba"'
EOF
4.
Create Directories
mkdir -p /oracle/product
chown -R oracle:dba /oracle/product
chmod -R 775 /oracle/product


5. Get and install the missing packages as per Installation guide
checking if the packages are available
rpm -qa | grep package_name
eg rpm -qa | grep binutils

Required packages or later (32_bit)

rpm -q binutils gcc glibc glibc-headers glibc-kernheaders glibc-devel compat-libstdc++ cpp compat-gcc make compat-db compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel setarch sysstat pdksh libaio libaio-devel --qf '%{name}.%{arch}\n'|sort

binutils.i386
compat-gcc-7.3-2.96.128.i386
compat-gcc-c++-7.3-2.96.128.i386
compat-libstdc++-7.3-2.96.128.i386
compat-libstdc++-devel-7.3-2.96.128.i386
cpp.i386
gcc.i386
gcc-c++.i386
glibc.i386
glibc-common.i386
glibc-devel.i386
glibc-headers.i386
glibc-kernheaders.i386
libstdc++.i386
libstdc++-devel.i386
libaio
libai-devel.i386
pdksh.i386
setarch.i386
sysstat.i386

Required packages or later (64_bit)

rpm -q binutils compat-db compat-libstdc++-33 glibc glibc-devel glibc-headers gcc gcc-c++ libstdc++ cpp make libaio ksh elfutils-libelf sysstat libaio libaio-devel setarch --qf '%{name}.%{arch}\n'|sort


binutils.x86_64
compat-db.x86_64
compat-libstdc++-33.i386
compat-libstdc++-33.x86_64
cpp.x86_64
elfutils-libelf.i386
elfutils-libelf.x86_64
gcc-c++.x86_64
gcc.x86_64
glibc-devel.i386
glibc-devel.x86_64
glibc-headers.x86_64
glibc.i686
glibc.x86_64
ksh.x86_64
libaio-devel.i386
libaio-devel.x86_64
libaio.i386
libaio.i386
libaio.x86_64
libaio.x86_64
libstdc++.i386
libstdc++.x86_64
make.x86_64
setarch.x86_64
sysstat.x86_64


6. configuring Kernel Parameters

cat >> /etc/sysctl.conf <kernel.shmmax = 4294967295
kernel.shmall = 268435456
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=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144
EOF


7.
/sbin/sysctl -p

------------
Run the following commands as root to verify your settings:

/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max

------------------
8.
Setting shell limits for the oracle user


cat >> /etc/security/limits.conf < oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

9.
cat >> /etc/pam.d/login < session required /lib/security/pam_limits.so
EOF

10.
cat >> /etc/profile < if [ USER = "oracle" ]; then
if [ SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384
-n 65536
fi
umask 022
fi
EOF

9.
cat >> /etc/csh.login < if ( USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
10.
Log in as oracle and execute the installer

11.
$ ./runInstaller

12.
You need to specify your Inventory Directory. The location should be set to
/u01/app/oraInventory or any valid path.
Operating System Group Name, oinstall. Click OK.

13. ...



No comments:

Post a Comment