Pre-Requirements for
Install Oracle Database
Software 11gR2 on RHEL5
This Document describes the tasks that you must complete before you start
Oracle Universal Installer (OUI).
This guide contains information required to install Oracle Database 11g
Release 2 (11.2) on RHEL5 – for training purpose.
Ensure the compatibility between Oracle Database Software version and
release with OS version, release, and CPU architecture.
1 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
<-- Run all below steps by root account with password root123 -->
Network Setup:
--------------
Configure Hostname and IP Address for the machine:
echo "192.168.0.1 oradb-server" >> /etc/hosts
cat /etc/hosts
Check RAM & SWAP:
----------------
Minimum: At least 1.0GB of RAM for install Oracle Database as Standalone
Server.
Recommended: 2 GB of RAM or more if you plan to install Oracle Database as
Standalone Server.
free -m
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
Check TEMP:
-----------
Ensure that you have at least 1GB of space in /tmp.
df -h /tmp
Check Kernel installed:
-----------------------
To determine whether the required kernel is installed, enter the following
command:
uname -rm
2 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Kernel Limits /etc/sysctl.conf:
-------------------------------
cp /etc/sysctl.conf /etc/sysctl.conf.bk
cat >> /etc/sysctl.conf << EOF
# Configuring oracle user’s environment start here #
kernel.shmmax = 836870912
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744
EOF
cat /etc/sysctl.conf
Security limits:
----------------
cp /etc/security/limits.conf /etc/security/limits.conf.bk
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
EOF
cat /etc/security/limits.conf
cp /etc/pam.d/login /etc/pam.d/login.bk
cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF
cat /etc/pam.d/login
3 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
As the root account, create a shell script labeled oracle.sh within
/etc/profile.d/ to create the appropriate ulimits for the oracle user.
cd /etc/profile.d
cat >> oracle.sh <<EOF
#Setting the appropriate ulimits for oracle user
if [ $USER = "oracle" ]; then
umask 022
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
EOF
cat oracle.sh
4 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Disabled SELinux "Security Enhancement" and Firewall:
-----------------------------------------------------
cp /etc/selinux/config /etc/selinux/config.bk
cat >> /etc/selinux/config << EOF
SELINUX=disabled
EOF
cat /etc/selinux/config
chkconfig iptables off
Check the following Packages installed:
---------------------------------------
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils compat-libstdc++-33
elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel-2.5 glibc-
headers kernel-headers ksh libaio libaio-devel libgomp libgcc libstdc++ libstdc++-devel make sysstat unixODBC
5 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Check Disk free:
----------------
- Space requirement for Oracle 11g Release 2 Software:
Enterprise Edition 3.95G - 4.5GB
Standard Edition 3.88G - 4.3GB
- Space requirement for Oracle Database Files: 1.7GB – 2.0GB -- > Creating a
database is always optional with oracle installation. Can be done later.
df –h
df -h /u01
Create OS Account and Groups:
-----------------------------
The Oracle Database software owner is the user 'ORACLE'.
groupadd -g 501 dba
cat /etc/group | grep dba
useradd -u 601 -g dba -G dba -d /home/oracle -s /bin/bash -c "Oracle RDBMS Software Owner" oracle
passwd oracle
oracle123
id oracle
cat /etc/passwd | grep oracle
Create Directories:
-------------------
mkdir -p /u01/app/oracle
ls -l /u01
ls -l /u01/app
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
ls -l /u01/app/oracle
ls -l /u01/app/oracle/product
ls -l /u01/app/oracle/product/11.2.0
chown -R oracle:dba /u01/app/oracle
chmod -R 777 /u01
6 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Make sure the Oracle Database 11g (database software are staged in the
following directories):
----------------------------------------------------------------------------
cd /stage/11.2.0/
ls -l
-rwxr-xr-x 1 root root 1285396902 Jan 27 2014 linux_11gR2_database_1of2.zip
-rwxr-xr-x 1 root root 995359177 Jan 27 2014 linux_11gR2_database_2of2.zip
unzip -o linux_11gR2_database_1of2.zip
unzip -o linux_11gR2_database_2of2.zip
ls -l
Output:
drwxr-xr-x 8 root root 4096 Aug 18 2009 database
-rwxr-xr-x 1 root root 1285396902 Jan 27 2014 linux_11gR2_database_1of2.zip
-rwxr-xr-x 1 root root 995359177 Jan 27 2014 linux_11gR2_database_2of2.zip
7 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Switch to oracle OS user's, setup & set the environment variables in the
initialization file (for this example we are using bash shell
(.bash_profile)):
----------------------------------------------------------------------------
su - oracle
id
cat >> .bash_profile <<EOF
# Configuring oracle user’s environment start here #
umask 022
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export ORACLE_BASE=/u01/app/oracle # Oracle Oracle Base
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 # Oracle Oracle Home
export ORACLE_SID=orcl
PATH=$PATH:/bin:/usr/bin:/usr/local/bin:home/oracle/bin:.
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib
export PATH
LD_LIBRARY_PATH=/usr/local/sbin:/sbin:usr/sbin:/root/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
EOF
cat .bash_profile
# Configuring oracle user’s environment end here #
env | grep ORA
env | grep PATH
8 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Reboot the machine:
-------------------
exit
reboot
Adjust Network Setting:
-----------------------
From System menu --> Administration --> Network
Select record with Nickname ="eth0.bak"
Click Delete Button, then click Yes.
Select record with Nickname ="eth0"
Click Edit, Select Statically IP Address, in Address Text Box = 192.168.0.1
Click Activate Button, then click Yes.
Close the window.
Reboot the machine:
-------------------
reboot
Ensure Machine Hostname and Network Setting is Working Fine:
------------------------------------------------------------
<-- Login by oracle account with password oracle123 -->
[oracle@oradb-server ~]#ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.071 ms
64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=0.143 ms
64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=0.017 ms
--- 192.168.0.1 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6002ms
rtt min/avg/max/mdev = 0.015/0.052/0.143/0.041 ms
[oracle@oradb-server ~]#hostname
oradb-server
9 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi
Oracle Database Software
11gR2 Installation Steps
on RHEL5
<-- Run all below steps by oracle account -->
[oracle@oradb-server ~]$ cd /stage/11.2.0/database/
[oracle@oradb-server database]$ ls -l
total 40
drwxr-xr-x 12 root root 4096 Aug 17 2009 doc
drwxr-xr-x 4 root root 4096 Aug 14 2009 install
drwxrwxr-x 2 root root 4096 Aug 14 2009 response
drwxr-xr-x 2 root root 4096 Aug 14 2009 rpm
-rwxr-xr-x 1 root root 4352 Aug 14 2009 runInstaller
drwxrwxr-x 2 root root 4096 Aug 14 2009 sshsetup
drwxr-xr-x 14 root root 4096 Aug 14 2009 stage
-rw-r--r-- 1 root root 5400 Aug 17 2009 welcome.html
[oracle@oradb-server database]$ ./runInstaller
Follow Less02_Installation.pdf
10 | Page
Oracle 11gR2 Database Administration Course
Prepared by Instructor. Areej Lardhi