11gR2 Database Installation with ASM on OEL5

357 views 4:19 pm 50 Comments 2 September, 2009

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

Tags: , , , , , , ,

50 thoughts on “11gR2 Database Installation with ASM on OEL5”

  • 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

  • 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?

  • 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

  • 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….

      • 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
        
        
  • 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.

  • 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.

    • 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

  • 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

    • 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.

  • 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.

  • 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.

  • Aishwarya Kambale

    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.

    • 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

  • 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

    • Gabriel,

      You can use dbca in silent mode. Find below syntax for same

      dbca -silent                             \
             -nodelist prod-001,prod-002\
             -createDatabase                     \
             -templateName General_Purpose.dbc   \
             -gdbName ORCL                       \
             -sid ORCL                           \
             -SysPassword oracle      \
             -SystemPassword oracle             \
             -emConfiguration NONE               \
             -storageType ASM                    \
               -asmSysPassword oracle \
               -diskGroupName DG_DATA01             \
             -characterSet AL32UTF8         \
             -totalMemory 3500
      

      Cheers
      Amit

  • I have a new install on a fresh VM Linux machine and I keep getting the INS-32025. I am trying to do the grid infrastructure install for a standalone database so that I can use ASM with 11GR2. I made sure the ORACLE_HOME and ORACLE_BASE are UNset. I get to the screen that asks for the oracle base and oracle home and no matter what i put, it fails. I have no oracle software installed, no oratab, no oracle anything on this machine. Any ideas please?

    • Mike,

      Yeah it sounds strange. Can you create a new directory manually and ensure that its empty and retry the operation. If it fails you would definitely need to contact support as this could be bug.

      -Amit

  • Hi,

    When I try to install Grid infrastructure using os user different from the one to install DB, I faced a problem.

    When I reached to creating db phase and the dbca started creating the db, it retuned the following errors:

    PRCR-1079: Failed to start resource ora.oradb.db
    ORA-12547: TNS lost contact
    CRS-2674: start ora.oradb.db on ‘srv07’ failed

    In order to see which command exactly caused the error, I created the scripts from DBCA and started to execute the commands manually. It turned out the errors were generated in the last stage of db creation as follows:

    [oracle@srv07 scripts]$ /u01/app/oracle/product/11.2.0/db_1/bin/srvctl start database -d oradb
    PRCR-1079 : Failed to start resource ora.oradb.db
    ORA-12547: TNS:lost contact
    ORA-12547: TNS:lost contact
    CRS-2674: Start of ‘ora.oradb.db’ on ‘srv07’ failed

  • How to resolves the issue of start ASM in the step to upgrade with OUI? I use the ‘grid’ user to upgrade from 10.2.0.4 to1.2.0.2.

    Mexman

  • sir i want to install oracle in my home pc for prctice which is exact i have taken training from oracle. in oracle training i just install grid and database but the asmdisk already created that i dont know how to create so kinly can u guide me how to create ASM disk then what are the prerequisite requirement for install grid and database 11g in oracle linux 5. i m using VMware.

  • Great it help me .I too saved the same problem.While installing 11GR2 on Vmware.Disks were not visible.Though i may able to see them from oracleasm listdisks.

    I use same solution as describled :-set asm_diskstring parameter to /dev/oracleasm/disks/D*

  • Hi,
    I’ve encountered a error when running root.sh

    Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Failure with signal 11 from command: /u01/app/oracle/product/11.2.0/grid/bin/crsctl pin css -n ora-south
    Creating local-only OCR (/u01/app/oracle/product/11.2.0/grid/bin/crsctl pin css -n ora-south) … failed

    OS linux 5 Update 2

    please help,

    Thank you

    please help

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.