Oracle 11g Release 2 Install on RHEL 6.2(x86_64 bit) - part1

"It's Not How Good You Are, It's How Good You Want To Be!"
--Anonymous
Properly setting up Oracle database and making it accessible from different client boxes will require several steps. Here is a step by step guide of Oracle 11.2.0.3 installation on RHEL 6.2(64 bit).

Before the actual Oracle software can be installed, there are a number of minimum requirements on the underlying OS which should be met. Installation cannot go ahead if these are not fulfilled. The requirements or prerequisites will vary on different OS architectures.
In this first part we will cover the installation prerequisites.  Below are the prerequisites for Red Hat Enterprise Linux 6.2 (64 bit).
Memory Requirements:
  • RAM Size: Minimum 1 GB.
  • Swap size:
    • 1.5 of RAM, for RAM size of 1 to 2 GB.
    • Equal to RAM, for RAM size of 2 to 16 GB.
    • 16 GB, for RAM size of more than 16 GB.
To check the available RAM and swap space(in KB), enter the following command:
root@jade#grep MemTotal /proc/meminfo
MemTotal:       32865916 kB
root@jade#grep SwapTotal /proc/meminfo
SwapTotal:      20423672 kB
The system has 31 GB of RAM and 19 GB of Swap space.


Shared Memory Requirements:
In Oracle 11g for Automatic Memory Management feature the shared memory size should be at least the size of RAM that you would allocate for Oracle. For e.g. if your shared memory is 2 GB then you cannot set Oracle Memory Size (MEMORY_TARGET) to 3 GB. The Automatic Memory Management can be controlled with the initialization parameters - MEMORY_MAX_TARGET and MEMORY_TARGET.
To check the amount of shared memory, enter the following command:
root@jade# df -h /dev/shm/
Filesystem            Size  Used     Avail  Use%   Mounted on
tmpfs                    16G  460K   16G   1%       /dev/shm
The system has 16 GB of shared memory, and that seems to be more than sufficient for me :)


Disk Space Requirements:
  • Temp space(/tmp): Minimum 1 GB. Check with the command "df -h /tmp".
  • Software Files: Minimum 4.35 GB for Enterprise & 3.73 GB for Standard Edition.
  • Data Files: Minimum 1.6 GB for Enterprise Edition or Standard Edition.
Check with the following commands:
root@jade# df -h /tmp
Filesystem            Size    Used  Avail    Use%   Mounted on
/dev/sda1             385G  9.8G  356G   3%       /

I plan to install Oracle software under /opt/oracle.
root@jade# df -h /opt
Filesystem            Size    Used   Avail   Use%   Mounted on
/dev/sda1             385G  9.8G   356G    3%      /
Both /tmp and /opt are mounted under /. The Available space is 356 GB.


Operating System Kernel Requirements:
The kernel requirements for Red Hat Enterprise Linux 6 is: 2.6.32-71.el6.x86_64 or later
root@jade# uname -r
2.6.32-220.el6.x86_64
More info about kernel requirements here.


Package Requirements:
Following are the list of packages required for Oracle 11g Release 2 on RHEL 6.
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
Note that you can have the minimum required version as above or a later version for the packages.
We can check if the required package is installed with the following command:
root@jade# rpm -q binutils-2.20.51.0.2-5.11.el6
package binutils-2.20.51.0.2-5.11.el6 is not installed
root@jade# rpm -q binutils-2.20.*
binutils-2.20.51.0.2-5.28.el6.x86_64


Network Requirements:
Check nsswitch.conf file if /etc/hosts is used for name resolution. We can use the command and the expected output as below:
root@jade# cat /etc/nsswitch.conf | grep hosts
#hosts:     db files nisplus nis dns
hosts:      files dns
The entry "files" shows that we are ok.
The hosts file should be configured with fully qualified host name of the server. We can check verify with the command: #cat /etc/hosts
Below is sample output from my working system:
root@jade# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.5.3.15       jade.blr.mot.com     jade
Here jade is the host where Oracle will be installed.


System Users and Groups:
Create the required users and groups with the following commands:
#groupadd  oinstall (Creating the Oracle Inventory group)
#groupadd  dba (Creating the Oracle DBA group)
#useradd -m -g oinstall -G dba -d /opt/oracle -s /bin/bash -c "Oracle 11g Owner" oracle
(Creating new Oracle user, here -g option specifies the primary group and -G specifies supplementary groups)
# passwd oracle (Change oracle user password created above)


Kernel Parameter Requirements:
Open in text editor the file /etc/sysctl.conf and add or edit the following lines for setting the minimum values for required kernel parameters of Oracle:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
Note that these are minimum required values.
After updating the file, enter the following command(sysctl -p) to change the current values of the kernel parameters. Below is the output from my system:
root@jade# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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

We can also check with the following command to confirm that the values are set correctly:
# /sbin/sysctl -a


Resource Limits:
Set the Oracle installation user resource limits in the file /etc/security/limits.conf.
In a text editor, open and add the following lines to /etc/security/limits.conf file:
oracle              soft    nproc   2047
oracle              hard   nproc   16384
oracle              soft    nofile   1024
oracle              hard   nofile   65536
Also add the following lines to /etc/pam.d/login file:
session    required     pam_limits.so

You can refer here about setting resource limits.


Disable Secure Linux:
In a text editor, edit the /etc/selinux/config file, set SELINUX flag as follows:
SELINUX=disabled

This concludes the pre-install steps.
Next we will go through the Oracle software installation steps: Part 2 Install Software Files

2 comments:

  1. Thanks for the this. You can do with some formatting :)

    ReplyDelete
  2. On CentOs the following package is required
    #yum install libXp
    You may get the following error otherwise:
    Exception Name: MakefileException
    Exception String: Error in invoking target 'install' of makefile '/opt/oracle/app/oracle/product/11.2.0/dbhome_1/ctx/lib/ins_ctx.mk'.
    Thanks

    ReplyDelete