Antony Reynolds' Blog

A Database Detour

Antony Reynolds
Senior Director Integration Strategy

Running Oracle Database 11gR2 on OEL 6

Recently I decided to build a new VirtualBox environment and base it on the latest Linux release (Oracle Enterprise Linux 6).  After installing OEL 64-bit my next task was to install a database, I decided to go with the latest 11g database even though it is not yet certified on OEL 6.

OS Preparation

Before starting the install I needed to make sure I had the correct OS configuration.  The Oracle® Database Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64 provides the requirements for the OS.


Section 4.3 Package Requirements of the install guide details the package requirements.  Note that the installer will incorrectly identify the required packages because in OEL 6 the package suffix for 32-bit is i686 rather than i386.

Note that when I installed there was no oracle-verified package for OEL 6.

I had setup yum to point to the OEL 6 repository and so I was able to use yum to install the required packages.  I ran the following command to install the required packages:

yum install binutils compat-libstdc++-33 compat-libstdc++-33.i686
        elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686
        glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio
        libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++
        libstdc++.i686 libstdc++-devel make numactl-devel sysstat

I also added the UnixODBC packages as detailed in  section 4.5.1 Oracle ODBC Drivers by using the following command:

yum install unixODBC unixODBC-devel unixODBC.i686 unixODBC-devel.i686

Users & Groups

In section 5 Creating Required Operating System Groups and Users Oracle recommend creating dba and oinstall groups to correspond to different DBA roles so I ran the following commands to create the groups and assign the already created oracle user to those groups:

groupadd oinstall
groupadd dba
usermod –g oinstall –G dba,oracle,vboxsf oracle

I verified this was correct by running the “id oracle” command which gives

uid=500(oracle) gid=502(oinstall) groups=502(oinstall),500(oracle),503(dba),501(vboxsf)

The vboxsf group is added to allow the oracle user to mount shared folders under Virtual Box.

Kernel Parameters

I edited /etc/sysctl in accordance with section 6 Configuring Kernel Parameters to set the following kernel parameters:

# Oracle Settings
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 = 10000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

I decreased the local port range to allow more ports for SOA Suite.  I made these effective immediately by running “sysctl –p”.

Resource Limits

I altered the oracle user resource limits according to Check Resource Limits for the Oracle Software Installation Users by editing /etc/security/limits.conf as follows:

# Oracle Settings
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   10240
oracle              hard    stack   10240

Software Installation

Having prepared the OS I could then install the database.  Before I launched the installer I set the ORACLE_HOSTNAME using the command:

export ORACLE_HOSTNAME=`hostname`

This helps the installer to know what hostname it should use for configuring the listener and EM.

I then launched the installer and created and configured a “Desktop Class” database using the Unicode (AL32UTF8) character set which will be required by the SOA Suite repository creation utility.

When checking for system pre-requisites the installer will complain about the following:

  • Kernel Parameter
    • ip_local_port_range because I reduced it for SOA Suite.
  • Packages
    • libaio, compat-libstdc++, libaio-devel, libgcc, libstdc++, unixODBC, unixODBC-devel because the suffix is now i686 rather than i386.
    • pdksh because in OEL 6 the package was renamed to ksh.

I chose to “Ignore All” errors and continued, this gave me a working database installation.


I am a Middleware guy and this image will probably be used by other Middleware folks.  We don’t know about databases so I set up the database to automatically start when the Linux OS was started.  I did this my setting the start parameter for the database to ‘Y’ in the /etc/oratab file so that the dbstart command would start my instance.


I then created an init script dbora in the /etc/init.d directory to start and stop the database at OS startup and shutdown.  This script is based on the one in the 11gR1 documentation.

#! /bin/sh –x
#chkconfig: 2345 99 10
#description: Oracle 11g Database

# Oracle Home Location

# Oracle User

# Oracle SID


# Execute command as Oracle User
if [ ! "$2" = "ORA_DB" ] ; then
   su - ${ORACLE} –c “$0 $1 ORA_DB”
   touch /var/lock/subsys/dbora

case $1 in
        ${ORACLE_HOME}/bin/dbstart ${ORACLE_HOME} &
        ${ORACLE_HOME}/bin/emctl start dbconsole &
        ${ORACLE_HOME}/bin/emctl stop dbconsole &
        ${ORACLE_HOME}/bin/dbshut ${ORACLE_HOME} &
        echo "usage: $0 {start|stop}"


The script is invoked by passing in the start or stop as a parameter.

To have it automatically invoked at startup and shutdown I used chkconfig as shown:

chkconfig –add dbora

This causes the database, listener and database control to be started when the system enters runlevel 2,3,4 or 5 based on the chkconfig property in the script.

Note that I start the database and EM in background tasks to improve startup performance.  But this does mean that the database might not have finished initialising when a user logs in.

Mission Complete

With the database installation complete I was able to take a snapshot of the VM ready to start building an SOA installation.

Join the discussion

Comments ( 2 )
  • guest Tuesday, October 11, 2011

    Very Gud, I myself tried installing 11gR2 on OEL6, but gave it upand downgraded to OEL5 because of these package problems. I still didn't understood about the yum things u did. will give it a try later.


  • hid xenon conversion kit Tuesday, October 25, 2011

    Thanks for this great and interesting article. I really enjoyed the article. It's really useful and informative for me.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.