Writing About Our Experiences With Oracle Databases
Friday September 3rd 2010

Latest Topics

Effect Of Multiple SHMMAX Settings

Last week I saw a warning message at database startup time saying: WARNING: EINVAL creating segment of size [Read More]

Finding blogging tough? Just copy and do find and replace

Finding blogging tough? Just copy and do find and replace

Well this is motto followed by Guenadi Jilevski for his blog http://gjilevski.wordpress.com and he seems to get result [Read More]

Physical Corruption: ORA-1578 part 3

Recently we encountered a block corruption issue in 10g database on Linux x86 64 bit and using ASM for storing database [Read More]

Cloning RAC Database with RMAN fails with error

Steps for cloning a RAC database  with RMAN is similar to cloning a single instance database. But while using rman [Read More]

DBMS_SCHEDULER jobs not running?

I came across this posting on OTN which lists down things to check in case your scheduler job is not . This is quite [Read More]

11gR2 Database Installation with ASM on OEL5

I will be listing down steps for 11g Release 2 installation on Linux x86. There has been few changes incorporated in 11gR2 which must be given due consideration before starting installation. ASM instance now runs from new Oracle Home called Grid Infrastructure.

If you wish to use ASM for storing database files, then you should install first Oracle grid infrastructure for a standalone server. It is also required if you wish to use Oracle Restart feature (Provides for automatic restart of DB and other components after a hardware or software failure or whenever your database host computer restarts) for single instance.

Environment used for this setup
Operating System – Oracle Enterprise Linux Release 5(OEL5) on Vmware
Physical Ram – 1Gb

Asmlib for labeling ASM Disks.Refer to following OTN article for configuring asmlib and creating disks.

Software can be downloaded from OTN at following link

Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86

Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86

All the pre-requisites for installation can be found here
http://download.oracle.com/docs/cd/E11882_01/install.112/e10840/pre_install.htm

I have tried to shorten it by keeping things which are relevant to our setup.

Check Packages

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

If you have yum installed on your machine, then it is very easy to install the packages. You can copy the list of packages in a text file and insert ‘yum install ‘ in beginning and execute it as root. This will install any missing packages. To know more about setting up yum, refer to my previous post

If Kernel parameters are not setup correctly, Oracle 11g OUI provides you  a fixup script and also ability to resume the installation process without need to re-run the earlier steps. Please refer to article here

Users,Roles and Groups for Installation

osdba group for ASM – Membership in the OSDBA group allows access to the files managed by Automatic Storage Management. It can be same as database osdba group. We will be using group dba in our setup.
OSASM group – Members of the OSASM group can use SQL to connect to an Automatic Storage Management instance as SYSASM using operating system authentication. The SYSASM privileges permit mounting and dismounting disk groups, and other storage administration tasks. SYSASM privileges provide no access privileges on an RDBMS instance. We will use asmadmin

OSOPER group – Similar to SYSOPER privilege in RDBMS, this is used for limited privileges like starting up and stopping the Oracle ASM instance. We will not be using separate group for it, will be selecting dba in our setup

oinstall – This is similar to previous releases, and used for Oracle Inventory group

I am using oracle user for installing Grid Infrastructure and Oracle Database Software. You can have a separate user say oragrid with oinstall membership and permission on oracle inventory directory.

Create Base directory where software will be installed. I used /u02/app/oracle

Add users and groups

/usr/sbin/groupadd -g 501 dba
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd oinstall

/usr/sbin/useradd -u 502 -g oinstall -G dba,asmadmin oracle

Add following entries to /etc/security/limits.conf

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

Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session    required     pam_limits.so

Add/replace following entries in /etc/sysctl.conf

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 = 1048586

Execute following command as root to change the current kernel parameters:

/sbin/sysctl -p

Copy following in your login 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

We need to start with Grid Infrastructure installation. Unzip the contents and execute  runInstaller . This would require 2.8Gb of disk space.

$./runInstaller

Please click on image below for  displaying screenshots for 11gR2 Grid Infrastructure installation

Grid_infra_install

Execute root.sh from Grid ORACLE_HOME as root user

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u02/app/oracle/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2009-09-02 05:07:26: Checking for super user privileges
2009-09-02 05:07:26: User has super user privileges
2009-09-02 05:07:26: Parsing the host name
Using configuration parameter file: /u02/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node db11g successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting

db11g     2009/09/02 05:09:24     /u02/app/oracle/product/11.2.0/grid/cdata/db11g/backup_20090902_050924.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2399 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

To install Database software, Unzip the contents of both the zip files and execute runInstaller . Ensure you have 3.95Gb of free disk space

$./runInstaller

Please click on image for  displaying screenshots for 11gR2 Database installation .

11g_db_install

You are done :-)

Component

Value /Commands to Check

Physical RAM >1 Gb

1Gb
grep MemTotal /proc/meminfo

Swap should be 1.5 times the RAM.

In our case it will be 1.5G
grep SwapTotal /proc/meminfo

/dev/shm to be configured to use MEMORY_TARGET

# df -h /dev/shm/

1Gb of /tmp space

df -h /tmp

Disk space Requirement for Grid Infrastructure Software (Enterprise edition)

2.95 Gb

Disk space Requirement for Database Software (Enterprise edition)

3.95 Gb

Packages for OEL5

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

  • Share/Bookmark

35 Comments for “11gR2 Database Installation with ASM on OEL5”

  • Amit says:

    Hi All,

    Screenshots for the installation are present here

    http://askdba.org/technical/11gr2_database_install/11gr2_grid_infra_viewlet_swf.html
    http://askdba.org/technical/11gr2_database_install/11gr2_database_install_viewlet_swf.html

    I was not able to figure out , how to implement delay mechanism in viewlet builder so you would see there is very less time gap between slides. I would recommend using the "Forward" button on bottom right to view slides one by one.

    Update :- I have been able to insert a delay in the slides :)
    Hope this helps..

    Cheers
    Amit

  • Jia Lu says:

    Hi
    Can you give out the way to set ASM or put it on Cast?
    Thanks

  • mike says:

    11g doku says ksh and I installed the ksh package on centos, but when I run the installer it fails and says pdksh is not installed… any ideas?

  • Amit says:

    Have you checked the installation guide. Have you installed all the required packages (pdksh-5.2.14 ?? ) Refer to installation guide and verify all packages are installed

    http://download.oracle.com/docs/cd/E11882_01/inst...

    Cheers
    Amit

  • Guireg says:

    Very good article, helpful ! Thanx very much !

  • Kabbo says:

    Hi Amit,
    uname -r
    2.6.18-164.el5
    Do you know, exactly, which ASM library should I install for my kernel? My os is OEL5 update 4?
    thanks,
    Kabbo

  • Aman.... says:

    Amit,

    I am not able to create the disks! I have added a disk to my vm, did the partition of it using fdisk and also asmlib is running as well. But when I am trying to create the disk from the aslib, it gives me the error that the creation is failed. Can you help in mentioning the steps to add the disks first from the o/s ? ASlib is fine wouold work I believe once the device is there.

    Aman….

    • Amit says:

      Aman,

      Can you please give output of fdisk -l /dev/sdb . Want to ensure if you have created a partition on it.

      Regards
      Amit

      • Amit says:

        Steps should be like

        #fdisk -l /dev/sdb
        
        Disk /dev/sdb: 41.9 GB, 41943040000 bytes
        64 heads, 32 sectors/track, 40000 cylinders
        Units = cylinders of 2048 * 512 = 1048576 bytes
        
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1               1       40000    40959984   83  Linux
        

        Once you have created a partition on device, you need to create a ASM disk

        
        # /usr/sbin/oracleasm createdisk VOL1 /dev/sdb1
        
  • Aman.... says:

    Yes, I have done it and in the morning,I was able to create two disks as well. But they are not visible from the Grid Infrastrucure. But the disks are visible from the asmlib interface properly. Just they are not shown when the installation starts and the disk group creation screen appears. So what could be the reason for it.

    I can’t post the output at the moment but can confirm that I have created teh partition on teh disk as well as the disks got created from asmlib. Now the problem lies that they created disks are not visible.

  • Aman.... says:

    This is what I have,

    [root@localhost yum.repos.d]# /etc/init.d/oracleasm listdisks
    ASMDISK1
    ASMDISK2
    ASMDISK3
    ASMDISK4
    ASMDISK5
    ASMDISK6
    ASMDISK7
    [root@localhost yum.repos.d]#

    But I am not able to see these disks when I am running the installer.

    • Amit says:

      Aman,

      I think I too faced this issue. I put asm_diskstring parameter as /dev/oracleasm/disks/ASM*

      You can see the same in screenshot of the installations.

      cheers
      Amit

  • Emmanuel says:

    Please can you send me instruction on how to install Oracle 11g R2 ASM standalone. This installation is without RAC setup

  • sachin says:

    HI,
    Can u plz help me out, osdba group user is creating CRD file,but they are getting owner by oracle user, why so

  • Amit says:

    Sachin,

    I am not sure what CRD actually means. Could you please provide following information

    a) which file you are looking. its directory location and also ls -ltr output
    b) Output of ps -ef|grep pmon
    If this is RAC, then also give output of ps -ef|grep d.bin

    Regards
    Amit

    • sachin says:

      Regarding the 11gR2, new DBA group OS user can connect as sysdba, but the problem is that CRD files(controlfile,redologfile,datafiles) and other directories(like ADR diag) created by this user(from SQL prompt ,recursive by oracle) are automatically getting owned by Oracle Software owner i.e.,oracle user.
      Plz. provide me a solution to solve this problem.

  • sachin says:

    Regarding the 11gR2, new DBA group OS user can connect now as sysdba, but the problem is that CRD files and other directories(like diag) created by this user(from SQL prompt ,recursive by oracle) are automatically getting owned by Oracle Software owner i.e.,oracle user.
    I think this due to the limited privileges from this test download version of 11gR2.
    Plz, guide me for further process to proceed.

  • dong says:

    Good article,Thank you very much.

  • ehnois says:

    Hello, how are you doing?
    I would like to know if it’s possible to install the Grid package after the Database 11gR2. The case is that I wasn’t planning to use the ASM feature at the time of the installation, but now, I would like to test it. Is it necessary to install all from scratch again? Following the Oracle guide, installing the Grid package first and then the Database ?
    Thank you for your help.
    Regards.
    Ehnois.

  • Amit says:

    Ehnois,

    I referred to the Oracle Grid Infra standalone guide, and according to it “If you plan to use Oracle Restart or Automatic Storage Management, you must install the grid infrastructure before installing your database”

    http://download.oracle.com/docs/cd/E11882_01/install.112/e10840/oraclerestart.htm#CIHCBGCC

    Cheers
    Amit

  • Aishwarya Kambale says:

    Hi Amit,

    Thanks for the quick guide for 11gr2 installation. It’s very helpful. I went through the entire blog including the two videos. You have installed GRID and then just created and configured the Database. I am new to Oracle and especially 11gr2.

    My question is: Do we require to install the software(oracle binaries) if grid is installed before?

    I installed and configured GRID successfully on standalone server. But when i try to configure LISTENER for the oracle software, it says that the LISTENER is already configured.

    • Amit says:

      Hi Aishwarya,

      Grid software (for standalone installation i,e non-RAC) is required if you wish to use ASM. Otherwise to use DB, you need to install DB software alone. So answer to your first question is Yes.

      Listener will be running from GRID_HOME. Check using ps -ef|grep tns
      You should see a listener running from your grid home

      Regards
      Amit

  • Williams Laverde says:

    Hi, Amit
    Do I have to install and configure ASMLib Before get into Grid Infra?

    Do you have the steps to configure your VM on Vmware and OEL5


Leave a Comment

Recent Comments

Ron Gordon had this to say

I had a simillar ORA-15020: discovered duplicate ASM disk issue, our sysadmin determined that there was a BAD Read the post

Can a security group be a member of another group? had this to say

install Oracle and have so many problems with it. My goal is to install it according to this link Read the post

M Tanvir had this to say

Hi Amit, really its great response, bcoz i just new with oracle. Thanks... Read the post

Aman.... had this to say

Hahaha aur sab se badi baat, he is not even ready to accept! jigar chahiye bhai yeh karne aur fir na maanne ke liye :D . Read the post

Dev had this to say

Hi Amit, Thanks for quick reply. It looks fine on my HTC Desire ( Android ) ,so no need to worry about Read the post