Installation of Oracle 11g Release 2 (11.2) on RedHat EL 5 and (Oracle) Enteprise Linux 5

Operating System : Linux – (Red Had Enterprise Linux – 5.0)

Database Version : Oracle 11g Release 2 (11.2.0)
Start a terminal session to server

Login as root

# login as: root
# oracle@127.0.0.1’s password:

To determine the distribution and version of Linux installed, enter the following command:

# cat /proc/version

Or

# uname -a

Alternatively, you can also enter the following command on some distributions of Linux:

# lsb_release -id

To check the RedHat version use

# cat /etc/redhat-release

To check which kernels are installed, run the following command:

# rpm -qa | grep kernel

To check which kernel is currently running, execute the following command:

# uname -r

The following is a sample output displayed by running this command on an RHEL 5 system:

2.6.18-194.17.1.el5

In this example, the output shows the kernel version (2.6.18) and errata level (-194.17.1.el5) on the system.

Memory Requirment on Linux x86 is at least 1 GB of RAM and on Linux x86-64 at least 4 GB of RAM

To determine the RAM size, enter the following command:

# grep MemTotal /proc/meminfo

Note:

On Linux, the HugePages feature allocates non-swappable memory for large page tables using memory-mapped files. If you enable HugePages, then you should deduct the memory

allocated to HugePages from the available RAM before calculating swap space.

To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo

As per oracle documentation, if RAM is Between 4 GB and 8 GB Swap Space should be 2 times the size of RAM so I will configure the Swap space

To start off, see how much swap space you already have.

#swapon -s

(you might need to prepend /sbin/ if you’re not root).

The command should produce a message that looks something like this:

Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 8388600 0 -1

The numbers under “Size” and “Used” are in kilobytes. To figure out where to put it. Run df -m (short for “disk free”) from a command line should produce output something

like this:

Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
59206      3191     52959   6% /
/dev/cciss/c0d0p1          965        38       878   5% /boot
tmpfs                     3991         0      3991   0% /dev/shm

I will use lvdisplay -v with the name of my volumne and to increase the size I will use

# lvextend -L16G /dev/VolGroup00/LogVol01

or

Disable swapping for the associated logical volume:

# swapoff -v /dev/VolGroup00/LogVol01

Resize the LVM2 logical volume by 8GB:

# lvresize /dev/VolGroup00/LogVol01 -L +8G

Format the new swap space:

# mkswap /dev/VolGroup00/LogVol01

Enable the extended logical volume:

# swapon -v /dev/VolGroup00/LogVol01

Create the LVM2 logical volume of size 256 MB:

# lvm lvcreate VolGroup00 -n LogVol01 -L 16G

Format the new swap space:

# mkswap /dev/VolGroup00/LogVol01

Add the following entry to the /etc/fstab file:

/dev/VolGroup00/LogVol01 swap swap defaults 0 0

Enable the extended logical volume:

# swapon -va

Test that the logical volume has been extended properly:

# cat /proc/swaps

# free

Check the Swap Size again

# cat /proc/swaps

This is give you the following output

Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       16777208        0       -1

Or

# free -g

(Use -m to display the size in mb and -g for GB)

This is will be the sample output

total       used       free     shared    buffers     cached
Mem:             7          0          6          0          0          0
-/+ buffers/cache:          0          7
Swap:           15          0         15

Check the following required packages(or later versions) are installed:

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106
libaio-devel-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-4.1.2
libstdc++-devel 4.1.2
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.2

To check each:

# rpm -q binutils-2.17.50.0.6-9.el5

binutils-2.17.50.0.6-9.el5
.....

# rpm -q elfutils-libelf-0.125

package elfutils-libelf-0.125 is not installed

Or

# yum list binutils-2.17.50.0.6

Loaded plugins: rhnplugin, security
Installed Packages
binutils.x86_64    2.17.50.0.6-9.el5    installed
Available Packages
binutils.x86_64    2.17.50.0.6-14.el5    rhel-x86_64-server-5

# yum list compat-libstdc++-33-3.2.3

Loaded plugins: rhnplugin, security
Installed Packages
compat-libstdc++-33.i386    3.2.3-61    installed
compat-libstdc++-33.x86_64    3.2.3-61    installed

Check all the packages:

# yum list binutils-2.17.50.0.6

Loaded plugins: rhnplugin, security
Installed Packages
binutils.x86_64    2.17.50.0.6-9.el5      installed
Available Packages
binutils.x86_64    2.17.50.0.6-14.el5     rhel-x86_64-server-5

# yum list compat-libstdc++-33-3.2.3

Loaded plugins: rhnplugin, security
Installed Packages
compat-libstdc++-33.i386         3.2.3-61          installed
compat-libstdc++-33.x86_64         3.2.3-61          installed

# yum list compat-libstdc++-33-3.2.3

Loaded plugins: rhnplugin, security
Installed Packages
compat-libstdc++-33.i386         3.2.3-61          installed
compat-libstdc++-33.x86_64         3.2.3-61          installed

# yum list elfutils-libelf-0.125

Loaded plugins: rhnplugin, security
Available Packages
elfutils-libelf.i386    0.125-3.el5     rhel-x86_64-server-5
elfutils-libelf.x86_64    0.125-3.el5     rhel-x86_64-server-5

# yum list elfutils-libelf-devel-0.125

Loaded plugins: rhnplugin, security
Available Packages
elfutils-libelf-devel.i386    0.125-3.el5    rhel-x86_64-server-5
elfutils-libelf-devel.x86_64    0.125-3.el5    rhel-x86_64-server-5

# yum list gcc-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
gcc.x86_64    4.1.2-44.el5    installed
Available Packages
gcc.x86_64    4.1.2-48.el5    rhel-x86_64-server-5

# yum list gcc-c++-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
gcc-c++.x86_64        4.1.2-44.el5    installed
Available Packages
gcc-c++.x86_64        4.1.2-48.el5    rhel-x86_64-server-5

# yum list glibc-2.5-24

Loaded plugins: rhnplugin, security
Available Packages
glibc.i686    2.5-24    rhel-x86_64-server-5
glibc.x86_64    2.5-24    rhel-x86_64-server-5

# yum list glibc-2.5-24

Loaded plugins: rhnplugin, security
Available Packages
glibc.i686    2.5-24            rhel-x86_64-server-5
glibc.x86_64    2.5-24            rhel-x86_64-server-5

# yum list glibc-common-2.5

Loaded plugins: rhnplugin, security
Installed Packages
glibc-common.x86_64    2.5-34             installed
Available Packages
glibc-common.x86_64    2.5-49.el5_5.5     rhel-x86_64-server-5

# yum list glibc-devel-2.5

Loaded plugins: rhnplugin, security
Installed Packages
glibc-devel.i386    2.5-34             installed
glibc-devel.x86_64    2.5-34             installed
Available Packages
glibc-devel.i386    2.5-49.el5_5.5     rhel-x86_64-server-5
glibc-devel.x86_64    2.5-49.el5_5.5     rhel-x86_64-server-5

# yum list glibc-devel-2.5

Loaded plugins: rhnplugin, security
Installed Packages
glibc-devel.i386    2.5-34             installed
glibc-devel.x86_64    2.5-34             installed
Available Packages
glibc-devel.i386    2.5-49.el5_5.5     rhel-x86_64-server-5
glibc-devel.x86_64    2.5-49.el5_5.5     rhel-x86_64-server-5

# yum list glibc-headers-2.5

Loaded plugins: rhnplugin, security
Installed Packages
glibc-headers.x86_64    2.5-34            installed
Available Packages
glibc-headers.x86_64    2.5-49.el5_5.5    rhel-x86_64-server-5

# yum list ksh-20060214

Loaded plugins: rhnplugin, security
Available Packages
ksh.x86_64    20060214-1.7          rhel-x86_64-server-5

# yum list libaio-0.3.106

Loaded plugins: rhnplugin, security
Installed Packages
libaio.i386    0.3.106-3.2         installed
libaio.x86_64    0.3.106-3.2         installed
Available Packages
libaio.i386    0.3.106-5           rhel-x86_64-server-5
libaio.x86_64    0.3.106-5           rhel-x86_64-server-5

# yum list libaio-0.3.106

Loaded plugins: rhnplugin, security
Installed Packages
libaio.i386    0.3.106-3.2         installed
libaio.x86_64    0.3.106-3.2         installed
Available Packages
libaio.i386    0.3.106-5           rhel-x86_64-server-5
libaio.x86_64    0.3.106-5           rhel-x86_64-server-5

# yum list libaio-devel-0.3.106

Loaded plugins: rhnplugin, security
Available Packages
libaio-devel.i386    0.3.106-5       rhel-x86_64-server-5
libaio-devel.x86_64    0.3.106-5       rhel-x86_64-server-5

# yum list libaio-devel-0.3.106

Loaded plugins: rhnplugin, security
Available Packages
libaio-devel.i386    0.3.106-5       rhel-x86_64-server-5
libaio-devel.x86_64    0.3.106-5       rhel-x86_64-server-5

# yum list libgcc-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
libgcc.i386    4.1.2-44.el5         installed
libgcc.x86_64    4.1.2-44.el5         installed
Available Packages
libgcc.i386    4.1.2-48.el5         rhel-x86_64-server-5
libgcc.x86_64    4.1.2-48.el5         rhel-x86_64-server-5

# yum list libgcc-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
libgcc.i386    4.1.2-44.el5         installed
libgcc.x86_64    4.1.2-44.el5         installed
Available Packages
libgcc.i386    4.1.2-48.el5         rhel-x86_64-server-5
libgcc.x86_64    4.1.2-48.el5         rhel-x86_64-server-5

# yum list libstdc++-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
libstdc++.i386        4.1.2-44.el5       installed
libstdc++.x86_64    4.1.2-44.el5       installed
Available Packages
libstdc++.i386        4.1.2-48.el5       rhel-x86_64-server-5
libstdc++.x86_64    4.1.2-48.el5       rhel-x86_64-server-5

# yum list libstdc++-4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
libstdc++.i386        4.1.2-44.el5       installed
libstdc++.x86_64    4.1.2-44.el5       installed
Available Packages
libstdc++.i386        4.1.2-48.el5       rhel-x86_64-server-5
libstdc++.x86_64    4.1.2-48.el5       rhel-x86_64-server-5

# yum list libstdc++-devel 4.1.2

Loaded plugins: rhnplugin, security
Installed Packages
libstdc++-devel.x86_64    4.1.2-44.el5    installed
Available Packages
libstdc++-devel.i386    4.1.2-48.el5    rhel-x86_64-server-5
libstdc++-devel.x86_64    4.1.2-48.el5    rhel-x86_64-server-5

# yum list make-3.81

Loaded plugins: rhnplugin, security
Installed Packages
make.x86_64    1:3.81-3.el5               installed

# yum list numa*

Loaded plugins: rhnplugin, security
Installed Packages
numactl.i386    0.9.8-7.el5    installed
numactl.x86_64    0.9.8-7.el5    installed
Available Packages
numactl.i386    0.9.8-11.el5    rhel-x86_64-server-5
numactl.x86_64    0.9.8-11.el5    rhel-x86_64-server-5
numactl-devel.i386    0.9.8-11.el5    rhel-x86_64-server-5
numactl-devel.x86_64    0.9.8-11.el5    rhel-x86_64-server-5

# yum list sysstat-7.0.2

Loaded plugins: rhnplugin, security
Available Packages
sysstat.x86_64    7.0.2-3.el5_5.1       rhel-x86_64-server-5

Or Use

This will give you following output

# rpm -q binutils-2.17.50.0.6

binutils-2.17.50.0.6-9.el5

# rpm -q compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3-61
compat-libstdc++-33-3.2.3-61

# rpm -q compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3-61
compat-libstdc++-33-3.2.3-61

# rpm -q elfutils-libelf-0.125

package elfutils-libelf-devel-0.125 is not installed

# rpm -q gcc-4.1.2

gcc-4.1.2-44.el5

# rpm -q gcc-c++-4.1.2

gcc-c++-4.1.2-44.el5

# rpm -q glibc-2.5-24

package glibc-2.5-24 is not installed

# rpm -q glibc-2.5-24

package glibc-2.5-24 is not installed

# rpm -q glibc-common-2.5

glibc-common-2.5-34

# rpm -q glibc-devel-2.5

glibc-devel-2.5-34
glibc-devel-2.5-34

#rpm -q glibc-devel-2.5

glibc-devel-2.5-34
glibc-devel-2.5-34

# rpm -q glibc-headers-2.5

glibc-headers-2.5-34

# rpm -q ksh-20060214

package ksh-20060214 is not installed

# rpm -q libaio-0.3.106

libaio-0.3.106-3.2
libaio-0.3.106-3.2

# rpm -q libaio-0.3.106

libaio-0.3.106-3.2
libaio-0.3.106-3.2

# rpm -q libaio-devel-0.3.106

package libaio-devel-0.3.106 is not installed

# rpm -q libaio-devel-0.3.106

package libaio-devel-0.3.106 is not installed

# rpm -q libgcc-4.1.2

libgcc-4.1.2-44.el5
libgcc-4.1.2-44.el5

# rpm -q libgcc-4.1.2

libgcc-4.1.2-44.el5
libgcc-4.1.2-44.el5

# rpm -q libstdc++-4.1.2

libstdc++-4.1.2-44.el5
libstdc++-4.1.2-44.el5

# rpm -q libstdc++-4.1.2

libstdc++-4.1.2-44.el5
libstdc++-4.1.2-44.el5

# rpm -q libstdc++-devel 4.1.2

libstdc++-devel-4.1.2-44.el5
package 4.1.2 is not installed

# rpm -q make-3.81

make-3.81-3.el5

# rpm -q numactl-devel-0.9.8.x86_64

package numactl-devel-0.9.8.x86_64 is not installed

# rpm -q sysstat-7.0.2

package sysstat-7.0.2 is not installed

If you would like to have a script which can check all the required packages then please see this post

Install packages not installed i.e.

# yum install glibc-2.5-24

and run

# yum update

or

# rpm -Uvh unixODBC-2.2.11-7.1.x86_64.rpm

# rpm -Uvh unixODBC-devel-2.2.11-7.1.x86_64.rpm

Please see this for more information on yum

Usually if this is the first time running yum update after the fresh install it will take quite sometime to update, for my installation it downloaded 510MB

During installation, the installer checks the system configuration file that sets core dump preferences to see if core dumps are enabled. The value must be a file, and the

file is checked to see if it contains the value of one (1). The following files are checked, in order of precedence:

/proc/sys/kernel/suid_dumpable
/proc/sys/fs/suid_dumpable
/proc/sys/kernel/core_setuid_ok

The first file that is present is read. If a value other than 1 is present in the file, then core files are disabled.

Follow the setups to enable core file creation on Oracle Enterprise Linux 5 and Red Hat Enterprise Linux 5:

Use a text editor to open the /etc/profile file of the Oracle Grid Infrastructure installation owner, and find the following line:

ulimit –S –c 0 > /dev/null 2>&1

Change it to the following:

ulimit -S -c unlimited > /dev/null 2>&1

Use a text editor to open /etc/sysconfig, and find the following line:

kernel.core_uses_pid

Confirm that it is set to 1. This setting appends the PID to the generated core file, which allows multiple core file dumps.

Find the following line:

fs.suid_dumpable

By default, this value is set to 0. Change it to 1.

Save /etc/sysconfig, and use the following command to reload settings:

# sysctl -p

Create oracle User Account, if you want to create users and groups based on job roles then check this

# groupadd dba

# useradd -g dba oracle

Set the password of the ORACLE user

# passwd oracle

Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Creating oracle directories

# mkdir /u01/oracle

# mkdir /u01/oracle/11.2

# chown -R oracle:dba /u01/oracle

Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile file and add following lines:

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/111
ORACLE_SID=ORCL
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

Save the .bash_profile and execute following commands for load new enviroment:

# cd /home/oracle/

# . .bash_profile

Verify if the new bash profile is loaded

# echo $ORACLE_HOME

/u01/oracle/11.2

Check resource limits:

Log in as an installation owner.

Check the soft and hard limits for the file descriptor setting, number of processes available to a user and stack setting:

# ulimit -Sn

1024

# ulimit -Hn

1024

# ulimit -Su

69631

# ulimit -Hu

69631

# ulimit -Ss

10240

# ulimit -Hs

unlimited

Ensure that the result is in the recommended range if not then Edit the /etc/security/limits.conf file and add following lines:

# vi /etc/security/limits.conf

oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   10240

Configuring Kernel Parameters

Note:
The kernel parameter and shell limit values shown are minimum values only. For production database systems, Oracle recommends that you tune these values to optimize the

# /sbin/sysctl -a | grep sem

This command displays the value of the semaphore parameters in the order listed.

# /sbin/sysctl -a | grep shm

This command displays the details of the shared memory segment sizes.

# /sbin/sysctl -a | grep file-max

This command displays the maximum number of file handles.

# /sbin/sysctl -a | grep ip_local_port_range

This command displays a range of port numbers.

# /sbin/sysctl -a | grep rmem_default

This command displays rmem_default

# /sbin/sysctl -a | grep rmem_max

This command displays rmem_max

# /sbin/sysctl -a | grep wmem_default

This command displays wmem_default

# /sbin/sysctl -a | grep wmem_max

This command displays wmem_max

# /sbin/sysctl -a | grep aio-max-nr

This command displays aio-max-nr

# vi /etc/sysctl.conf

Add or edit lines similar to the following:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048586

Note:
Include lines only for the kernel parameter values that you want to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current values are larger than the minimum value, then specify the larger value.

The minimum value required for shmmax is 0.5 GB. However, Oracle recommends that you set the value of shmmax to 2.0 GB for optimum performance of the system.

To apply above settings reboot system or execute

# /sbin/sysctl -p

To confirm the parameters and values in /etc/system file are set properly

# cat /etc/sysctl.conf

Edit the /etc/pam.d/login file and add following line: (For More info see Note: 567524.1 and Note.300819.1)

# vi /etc/pam.d/login

session required pam_limits.so

If you determined that the /tmp directory has less than 1 GB of free disk space, then identify a file system with at least 1 GB of free space and set the TMP and TMPDIR environment variables to specify a temporary directory on this file system:

To determine the free disk space on each mounted file system use the following command:

# df -h /tmp

If necessary, enter commands similar to the following to create a temporary directory on the file system that you identified, and set the appropriate permissions on the directory:

# sudo mkdir /tmp/tmp

# sudo chmod a+wr /tmp/tmp

Enter commands similar to the following to set the TMP and TMPDIR environment variables:

Bourne, Bash, or Korn shell:

# TMP=/user/tmp

# export TMP TMPDIR

# TMPDIR=/user/tmp

Check and Set Display

# echo $DISPLAY

# Su – root

# DISPLAY=:0.0

# export DISPLAY

Password:( Enter the root password here)

# xhost +

Make sure that xclock command is running

# xlcok

Download Software from Oracle Site or Upload from your local computer already downloaded software to RHEL Server

To download the software directly to your sever using wget, read this post

Update: 10th Feb, 2011 Please read A Quick review post as well

Comments

  1. Thanks for the step by step, I was having an error while trying to just run the installer for Oracle 11g 2 and I was just not getting the preqs right. glibc-2.5-24 would not install through yum until I entered yum update command.

  2. Author

    I am glad that this helped you.

    Glibc-2.5-24 will give you installation issues due to Dependency, and that is why you need to run yum update for dependent packages to be update to specific version. I will edit the post and will add this for other users to benefit from this.

    Thank you for you input.

  3. Hi,
    thank you for your guide. Very useful.
    I’m new to Unix and Oracle and I don’t understand if I made a mistake or the text you wrote is wrong:

    Creating oracle directories
    # mkdir /u01/oracle
    # mkdir /u01/oracle/11.2
    # chown -R oracle:dba /u01/oracle
    Setting Oracle Enviroment
    Edit the /home/oracle/.bash_profile file and add following lines:
    ORACLE_BASE=/opt/oracle
    ORACLE_HOME=$ORACLE_BASE/111
    ORACLE_SID=ORCL
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$PATH:$ORACLE_HOME/bin
    export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
    Save the .bash_profile and execute following commands for load new enviroment:
    # cd /home/oracle/
    # . .bash_profile

    Verify if the new bash profile is loaded
    # echo $ORACLE_HOME
    /u01/oracle/11.2

    How can you verify these above mentioned values $ORACLE_HOME (=/u01/oracle/11.2) if you set the variable to $ORACLE_BASE (/opt/oracle)/111 in .bash_profile?
    I’ve missed something or it is only a writing mistake?
    Thank you in advance, Max.

  4. you’re truly a good webmaster. The web site loading pace is amazing. It kind of feels that you are doing any unique trick. Also, The contents are masterpiece. you’ve done a magnificent job in
    this topic!

Leave a Comment