DBA Tips Archive for Oracle

  


Installing Grid Control (10.2.0.5) on RHEL 5 with 11g Database Repository

by Jeff Hunter, Sr. Database Administrator


Contents

  1. Overview
  2. Pre-Installation Requirements
  3. Install Enterprise Manager Base Version 10.2.0.1
  4. Patch the Enterprise Manager Installation to 10.2.0.5
  5. Configure Grid Control Installation using ConfigureGC.pl
  6. Verify Grid Control Configuration
  7. Secure the OMS
  8. Starting / Stopping the Grid Control Environment
  9. Installing Grid Control Management Agent (10.2.0.5)
  10. About the Author



Overview

This article is a comprehensive guide for installing Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) on the Red Hat Enterprise Linux 5 operating system.

Oracle Enterprise Manager 10g Grid Control consists of three major software components, all of which can exist on one single machine or multiple machines:

The Grid Control Console is an additional software component which is a browser-based central console through which administrators can perform all monitoring, administration, and configuration tasks for the enterprise.

For the purpose of this article, all components of Grid Control will be installed on a single server; namely oemprod.idevelopment.info. The server oemprod will already have an existing Oracle Database 11g Release 1 Enterprise Edition software installation (11.1.0.7.0) and a new 11g database created named emrep which will be used to store the Oracle Management Repository.

  For a comprehensive guide on how to install Oracle Database 11g Release 1 on the Red Hat Enterprise Linux 5 platform, please see my article "Installing Oracle Database 11g Release 1 on Linux - (RHEL 5)".

Before creating the Oracle 11g database to host the Oracle Management Repository, please see the section "Prepare the Existing Oracle 11g Database for the Grid Control Install" to ensure a successful Grid Control installation.

Installing Enterprise Manager 10g Grid Control Release 5 is a two step process.

  1. The first step is to install the full release of Enterprise Manager 10g Grid Control Release 2 (sometimes called the base version). A full release refers to the first, complete Enterprise Manager 10g Grid Control version which for Linux x86 is 10.2.0.1. (The full release for Linux x86_64 is 10.2.0.3) A full release comprises all three components that form Grid Control, mainly Oracle Management Service, Oracle Management Repository, and Oracle Management Agent.
  2. The second step in the installation process is to patch the base version by applying the Enterprise Manager Release 5 patch set (10.2.0.5).

The following is a conceptual view of what the configuration will look like by the end of this document:


Install Software-Only Installation Method

This article documents the steps used to install Oracle Enterprise Manager 10g Grid Control Release 5 on the Red Hat Enterprise Linux 5 platform (RHEL 5). When searching Oracle's certification matrix, you will see that Enterprise Manager 10g Grid Control Release 2 is not supported on the RHEL 5 platform. This, however, is the full release install (or base release install) which is the first step in the installation process and is required in order to apply the Enterprise Manager 10g Grid Control Release 5 patch set to. At first glance, this would seem a bit confusing. How do you perform the first step of the installation process which is to install Enterprise Manager 10g Grid Control Release 2 when it is not supported on the RHEL 5 operating system? The solution is quite simple. We will be using the "Installing Software-Only and Configuring Later" (Silent Mode) method which allows us to install only the software binaries for Enterprise Manager 10g Grid Control Release 2, that is, without any configuration to the installation.

  The "Installing Software-Only and Configuring Later" installation method is supported only by Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or higher. This type of installation saves both time and effort, and is best suited when you are installing Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or higher for the first time in your environment.

DO NOT use this method to patch or upgrade any existing, previous release of Grid Control. For example, if you already have Enterprise Manager 10g Grid Control Release 3 for Linux x86 (10.2.0.3), then do NOT use this method to patch or upgrade to a higher release.

After the software-only installation of the Enterprise Manager 10g Grid Control Release 2 binaries, we immediately then apply the Enterprise Manager 10g Grid Control Release 5 patch set which again will use the "Installing Software-Only and Configuring Later" (Silent Mode) method. Both software installations will be performed using the Oracle Universal Installation Silent Mode (non-GUI) option. After successfully performing the Enterprise Manager 10g Grid Control Release 2 software-only installation and applying the Enterprise Manager 10g Grid Control Release 5 patch set using the software-only method, the final step will be to "Configure" the Grid Control environment using the Perl script ConfigureGC.pl. The ConfigureGC.pl Perl script is included as part of the Oracle Management Service (OMS) install.

  Red Hat Enterprise Linux 5, along with the other operating system's listed below, are considered newly supported platforms by Enterprise Manager 10g Grid Control Release 5 (10.2.0.5).

  • Oracle Linux (OL) 5.0, 5.1, 5.2
  • Red Hat Enterprise Linux 5.0, 5.1, 5.2
  • SUSE Linux Enterprise 10
  • HP- UX Itanium 11.31
  • AIX 6.1
  • HP-UX PA-RISC 11.31


Oracle Management Repository

Oracle Enterprise Manager 10g Grid Control requires an Oracle database to store the Oracle Management Repository. The Oracle Management Repository consists of objects such as RDBMS jobs, packages, procedures, views, and two tablespaces in an Oracle Database that contain all available information about administrators, targets, and applications managed within Enterprise Manager.

The Management Service component uploads the monitoring data it receives from the Management Agents to the Management Repository. The Management Repository then organizes the data so that it can be retrieved by the Management Service and displayed in the Grid Control console. Because data is stored in the Management Repository, it can be shared between any number of administrators accessing the Grid Control console.

During the installation of Enterprise Manager, the OUI provides two pre-defined methods for creating the Management Repository.

Installing Enterprise Manager 10g Grid Control Using a New Database
Installs Enterprise Manager 10g Grid Control onto the host machine, creating the Management Repository on a new Enterprise Edition Oracle 10g Database Release 1 (10.1.0.4).
Installing Enterprise Manager 10g Grid Control Using an Existing Database
Installs Enterprise Manager 10g Grid Control onto the host machine, creating the Management Repository on a qualified existing database, which may be local to the host or remote.
For the purpose of this article, I will be installing Enterprise Manager 10g Grid Control using an existing database. The Oracle Database 11g Release 1 Enterprise Edition software has already been installed on the Grid Server machine and an Oracle 11g database named emrep has been created which will be used for the Oracle Management Repository.

Note that the database you use for the Oracle Management Repository must be Enterprise Edition and have fine-grained access control enabled. Additionally, specific initialization parameters must be set on the existing database to ensure a successful installation.

If the existing database is on the same host where OMS is installed (as will be the case in this article), the database gets added to the All Targets page of the Grid Control console, but you will have to provide configuration details to enable monitoring of that database. To do so (after installing and configuring Grid Control), log in to Enterprise Manager Grid Control, click Targets and then click All Targets. From the list, select the database instance and click Configure. In the "Configure Database Instance: Properties Page", provide the details.

  Note that a default "Enterprise Edition" database installation is NOT sufficient for use as a Grid Control repository!

Also, the existing Oracle database must be free of any prior repository contents, whether for Database Control or Grid Control.

I will be covering a full list of requirements in the section "Prepare the Existing Oracle 11g Database for the Grid Control Install" which describes the tasks necessary to prepare the existing Oracle 11g database to host the Oracle Management Repository.


Oracle Homes

The Oracle Universal Installer (OUI) provides for a seamless installation experience by performing multiple Oracle home installations for the above mentioned components depending on the type of installation that is selected. A typical Oracle Enterprise Manager installation will create a separate Oracle home for all three components. The Oracle homes that are created as sub-directories by the installer will be placed under the Parent Directory that you specify during installation.

This parent directory is also called the Oracle Home Directory or Base directory. The default value used by the OUI is $ORACLE_BASE/OracleHomes.

  Although not required, I will be setting the $ORACLE_BASE environment variable in the .bash_profile login script for the oracle user account which will get recognized by the OUI.

This article will specify the Parent Directory as /u01/app/oracle/product. Keep in mind that this article will make use of an existing Oracle 11g database which is already installed on the Grid Control server. Therefore, the OUI will only create directories for the "Oracle Management Service" and the "Oracle Management Agent". The Oracle home directory used by the existing Oracle Database 11g Release 1 software is /u01/app/oracle/product/11.1.0/db_1. The corresponding Oracle home directories for the two software components are listed in the table below:

Enterprise Manager Oracle Homes
Oracle Management Service /u01/app/oracle/product/oms10g
Oracle Management Agent /u01/app/oracle/product/agent10g


Enterprise Manager Configuration

The following table describes the various installation and configuration parameters that will be used in this article.

Enterprise Manager Configuration
Machine Name oemprod.idevelopment.info
Memory 2GB
IP Address 192.168.1.125
Operating System CentOS Release 5.3 - (32-bit)
OEM - Base Release Enterprise Manager 10g Grid Control R2 (12.2.0.1) for Linux
OEM - Patch Release Enterprise Manager 10g Grid Control R5 (12.2.0.5) for Linux
OEM - Oracle Home Parent Directory /u01/app/oracle/product
Oracle Home - Management Service /u01/app/oracle/product/oms10g
Oracle Home - Management Agent /u01/app/oracle/product/agent10g
Oracle Home - Management Repository /u01/app/oracle/product/11.1.0/db_1
Management Repository Install Method Using an Existing Database
Existing Repository Database Version 11.1.0.7.0 - Enterprise Edition
Existing Repository Database Name emrep
Existing Repository Database Files /u02/oradata/EMREP/datafile/
All O/S and DB Passwords are the Same emgc10g
oraInventory Location Existing /etc/oraInst.loc points to /u01/app/oraInventory
OMS Security OMS will be Unlocked After the Install


Further Reading

Grid Control is a large, bloated, and overly complex web application which, needless to say, is riddled with a considerable number of bugs. Consequently, this article should not be considered a substitute for completely reading and understanding the official installation guide and release notes from Oracle (although, in many cases, the documentation is as poorly written as the OEM application itself). Pay considerable attention to the prerequisites for your environment before attempting the install. The following links can be used to download the official installation guides and release notes for Oracle Enterprise Manager 10g:

Enterprise Manager 10g Grid Control Release 2 (10.2.0.1)

  Enterprise Manager Grid Control Quick Installation Guide for Linux x86
  Enterprise Manager Release Notes for Linux x86
Enterprise Manager 10g Grid Control Release 5 (10.2.0.5)
  Enterprise Manager Grid Control Release Notes for Linux and Microsoft Windows
Oracle Management Agent
  10g R2 Management Agent Deployment Best Practices



Pre-Installation Requirements

This section provides the pre-installation requirements for installing Oracle Enterprise Manager 10g Grid Control Release 2 on Red Hat Enterprise Linux 5.

Required Linux Packages

The Enterprise Manager server must be running the following (or later) package versions for Red Hat Enterprise Linux 5.

32-bit (x86) Installations

make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5-18
libXp-1.0.0-8.1

64-bit (x86_64) Installations

make-3.79
binutils-2.14
gcc-3.2
glibc-devel-2.5
glibc-devel-2.5-18 (32 bit)
libXp-1.0.0-8.1
libXp-1.0.0-8.1 (32 bit)

  Note that there are packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both versions are provided on the 64-bit Red Hat Enterprise Linux 5 installation media.

  Ensure that libXp.rpm is installed. Note that this package is not installed by default with the default RPM packages for Red Hat Enterprise Linux 5 and Oracle Linux 5 platforms. So, you must install it manually. For Red Hat Enterprise Linux 4, this file is provided by the package xorg-x11-deprecated-libs, which is installed with the default package installation, however, this is not the case for Red Hat Enterprise Linux 5 and Oracle Linux 5.

To verify the libXp.rpm package is installed (which in case, mine are), run the following command:

# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"| grep libXp
libXpm-3.5.5-3 (i386)
libXp-devel-1.0.0-8.1.el5 (i386)
libXpm-devel-3.5.5-3 (i386)
libXp-1.0.0-8.1.el5 (i386)
If the libXp.rpm package is not installed, run the following command:
# rpm -ivh </path/to/>libXp.<version>.i386.rpm
You will find /usr/lib/libXp.so.6 when you install the /Server/libXp-1.0.0-8.1.el5.i386.rpm package from the Red Hat Enterprise Linux 5 DVD.


Set Required Kernel Parameters

The system must have at least the following recommended kernel parameters. This list is the same for both the Linux x86 and Linux x86_64 architecture:

Parameter Recommended Value Default Value How to Check
shmmax 536870912 33554432 cat /proc/sys/kernel/shmmax
shmmni 4096 4096 cat /proc/sys/kernel/shmmni
shmall 2097152 2097152 cat /proc/sys/kernel/shmall
shmmin 1 1 ipcs -lm | grep "min seg size"
 
semmsl 250 250 cat /proc/sys/kernel/sem | awk '{print $1}'
semmns 32000 32000 cat /proc/sys/kernel/sem | awk '{print $2}'
semopm 100 32 cat /proc/sys/kernel/sem | awk '{print $3}'
semmni 128 128 cat /proc/sys/kernel/sem | awk '{print $4}'
 
file-max 65536 102696 cat /proc/sys/fs/file-max
 
ip_local_port_range 1024   65000 32768   61000 cat /proc/sys/net/ipv4/ip_local_port_range
 
rmem_default 262144 109568 cat /proc/sys/net/core/rmem_default
rmem_max 262144 131071 cat /proc/sys/net/core/rmem_max
wmem_default 262144 109568 cat /proc/sys/net/core/wmem_default
wmem_max 262144 131071 cat /proc/sys/net/core/wmem_max

  If the current value for any kernel parameter is higher than the value listed in this table, do not change the value of that parameter.

For this article, I identified and provide the values that will need to be added to the /etc/sysctl.conf file which is used during the boot process. Note that a few of the values used in my sample /etc/sysctl.conf file (below) are higher than the minimum required settings documented for Oracle Enterprise Manager Grid Control Release 5. These higher values were set to support the Oracle 11g database hosted on the Grid Control server and will work just fine for Enterprise Manager.

  Prior to adding the following kernel parameter values to the /etc/sysctl.conf file, you will need to remove the two shared memory kernel parameters (kernel.shmmax and kernel.shmall) put in by Red Hat Enterprise Linux 5.


# ......................... < SNIP> .........................

# +---------------------------------------------------------+
# | KERNEL PARAMETERS FOR ORACLE 11g                        |
# +---------------------------------------------------------+
# | Configure the kernel parameters for all Oracle Linux    |
# | servers by setting shared memory and semaphores,        |
# | setting the maximum amount of file handles, setting the |
# | networking parameters, and finally setting the IP local |
# | port range.                                             |
# +---------------------------------------------------------+

# +---------------------------------------------------------+
# | SHARED MEMORY                                           |
# +---------------------------------------------------------+
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152

# +---------------------------------------------------------+
# | SEMAPHORES                                              |
# | ----------                                              |
# |                                                         |
# | SEMMSL_value  SEMMNS_value  SEMOPM_value  SEMMNI_value  |
# |                                                         |
# +---------------------------------------------------------+
kernel.sem = 250 32000 100 128

# +---------------------------------------------------------+
# | FILE HANDLES                                            |
# ----------------------------------------------------------+
fs.file-max = 102696

# +---------------------------------------------------------+
# | LOCAL IP RANGE                                          |
# ----------------------------------------------------------+
net.ipv4.ip_local_port_range = 1024 65000

# +---------------------------------------------------------+
# | NETWORKING                                              |
# ----------------------------------------------------------+
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

After adding the above lines to the /etc/sysctl.conf file, they persist each time the system reboots. If you would like to make these kernel parameter value changes to the current system without having to first reboot, enter the following command:

[root@oemprod ~]# /sbin/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
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
Review the output from the above command and verify that the values are correct. If the values are not correct, edit the /etc/sysctl.conf to correct the values, re-run the sysctl -p command and verify the values.


Prepare Red Hat Enterprise Linux 5 Environment

Oracle Enterprise Manager 10g Grid Control Release 2 is not directly supported on the Red Hat Enterprise Linux 5 platform. As mentioned in the Overview section of this article, we will be using the "Installing Software-Only and Configuring Later" (Silent Mode) method which allows us to install only the software binaries for Enterprise Manager 10g Grid Control Release 2, that is, without any configuration to the installation. After the software-only installation of the Enterprise Manager 10g Grid Control Release 2 binaries, we immediately then apply the Enterprise Manager 10g Grid Control Release 5 patch set which again will use the "Installing Software-Only and Configuring Later" (Silent Mode) method. Both software installations will be performed using the Oracle Universal Installation Silent Mode option (non-GUI).

To ensure the Enterprise Manager 10g Grid Control Release 2 software can be successfully installed on the RHEL 5 platform, execute the following commands as root:

[root@oemprod ~]# ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
[root@oemprod ~]# chmod 755 /usr/lib/libgdbm.so.2.0.0
[root@oemprod ~]# chmod 755 /usr/lib/libdb.so.2


Host Name Requirement

The host name must be a valid host name. For example, oemprod.idevelopment.info or oemprod. It cannot, however, be an IP address. At the same time, it cannot be localhost.localdomain as strings used in the /etc/hosts file. At the time of invoking the installer, you can pass "ORACLE_HOSTNAME=<host_name> -local" as an argument if necessary.


Create the Oracle User Account

This article assumes the Oracle Database 11g Release 1 Enterprise Edition software has already been installed on the Enterprise Manager server and as such, the UNIX groups (oinstall, dba, and oper) and oracle user account have already been created.

  Although creating the UNIX groups and UNIX account may be option in this section, it is still highly recommended that you use the .bash_profile login script I have for the oracle user account.

Creating the UNIX groups and UNIX account described in this section is only required if no previous Oracle software product has been installed on the Enterprise Manager server. If Enterprise Manager will be the first Oracle software product installed on this server, then this section provides the commands necessary to create the required UNIX groups and UNIX user account required for installing Grid Control. This section can also be used as a reference for how my environment is configured.

If the UNIX groups (oinstall, dba, and oper) and user (oracle) are not already created, use the following commands to create them for the Enterprise Manager installation.

[root@oemprod ~]# groupadd -g 501 oinstall
[root@oemprod ~]# groupadd -g 502 dba
[root@oemprod ~]# groupadd -g 503 oper

[root@oemprod ~]# useradd -m -u 501 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
[root@oemprod ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper)
Set the password for the oracle account:
[root@oemprod ~]# passwd oracle
Changing password for user oracle.
New UNIX password: xxxxxxxxxxx
Retype new UNIX password: xxxxxxxxxxx
passwd: all authentication tokens updated successfully.
Create a new directory that will be used to store the Enterprise Manager software. When configuring the oracle user's environment (later in this section) we will be assigning the location of this directory to the $ORACLE_BASE environment variable. After the directory is created, you must then specify the correct owner, group, and permissions for it.
[root@oemprod ~]# mkdir -p /u01/app/oracle
[root@oemprod ~]# chown -R oracle:oinstall /u01/app
[root@oemprod ~]# chmod -R 775 /u01/app
Next, create the directory that will be used to store the Oracle database files for the Management Repository (on the /u02 file system):
[root@oemprod ~]# mkdir -p /u02/oradata
[root@oemprod ~]# chown oracle:oinstall /u02/oradata
[root@oemprod ~]# chmod 775 /u02/oradata

[root@oemprod ~]# mkdir -p /u03/flash_recovery_area
[root@oemprod ~]# chown oracle:oinstall /u03/flash_recovery_area
[root@oemprod ~]# chmod 775 /u03/flash_recovery_area
To ensure that the environment is setup correctly for the "oracle" UNIX user account, use the following .bash_profile:

Login to the database server as the oracle user account:

[root@oemprod ~]# su - oracle
.bash_profile for Oracle User
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

alias ls="ls -FA"
alias s="screen -DRRS iPad -t iPad"

export JAVA_HOME=/usr/local/java

# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/oms10g
export ORACLE_PATH=$ORACLE_BASE/dba_scripts/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=oms10g
export PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin
export PATH=${PATH}:$ORACLE_HOME/Apache/Apache/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/dba_scripts/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_BASE/product/11.1.0/db_1/network/admin
export ORA_NLS10=$ORACLE_BASE/product/11.1.0/db_1/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/opmn/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp


Prepare the Existing Oracle 11g Database for the Grid Control Install

Before installing Enterprise Manager Grid Control with an existing, certified Oracle database, ensure that you meet the prerequisites described in this section.

The existing Oracle database and TNS Listener process must be running prior to installing Enterprise Manager Grid Control.

Enable Fine Grained Access Control

Make sure that the Enterprise Edition database you select for the Oracle Management Repository has the Fine Grained Access Control (FGAC) option set to true. This is required for a successful Management Repository creation. Check v$options for this setting:
SQL> select value from v$option where parameter = 'Fine-grained access control';
  
VALUE
-----------
TRUE
The FGAC option is typically installed and enabled during a default install and database creation. If for any reason the FGAC option is not enabled, run the following in SQL*Plus as the SYS user in the order specified to create the DBMS_RLS package:
SQL> $ORACLE_HOME/rdbms/admin/dbmsrlsa.sql
SQL> $ORACLE_HOME/rdbms/admin/prvtrlsa.plb

Install DBMS_SHARED_POOL Package

Verify the DBMS_SHARED_POOL package is installed on the existing Oracle database by running the following statement:
SQL> select count(*) from DBA_OBJECTS where object_name='DBMS_SHARED_POOL';

  COUNT(*)
----------
         2
If the count returned is zero, then log in as SYSDBA, install the DBMS_SHARED_POOL package, and then re-check:
SQL> @?/rdbms/admin/dbmspool.sql

Package created.


Grant succeeded.


View created.


Package body created.

SQL> commit;

Commit complete.

SQL> @?/rdbms/admin/utlrp.sql

SQL> select count(*) from DBA_OBJECTS where object_name='DBMS_SHARED_POOL';

  COUNT(*)
----------
         2

Remove any Existing Management Repository

The existing Oracle database must be free of any prior repository contents, whether for Database Control or Grid Control. The existing Oracle 11g database in my example was configured with Database Control:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.7.0
Copyright (c) 1996, 2008 Oracle Corporation.  All rights reserved.
https://oemprod:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/oemprod_emrep/sysman/log
If your existing Oracle database is configured with Database Control, then ensure that you de-configure it before you begin the installation of Grid Control.

To de-configure Database Control for a single instance database, run the following command:

[oracle@oemprod ~]$ echo $ORACLE_SID
emrep

[oracle@oemprod ~]$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop

STARTED EMCA at May 2, 2009 5:07:58 PM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: emrep
Listener port number: 1521
Password for SYS user: emgc10g
Password for SYSMAN user: emgc10g
Do you wish to continue? [yes(Y)/no(N)]: Y
May 2, 2009 5:08:21 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/emrep/emca_2009_05_02_17_07_58.log.
May 2, 2009 5:08:22 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
May 2, 2009 5:08:46 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
May 2, 2009 5:11:43 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at May 2, 2009 5:11:50 PM

  To de-configure Database Control for a Real Application Clusters (RAC) database, run the following command:
$ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop - cluster

Verify Existing oraInventory Location

Given the fact that Enterprise Manager 10g Grid Control will be installed on a server with an existing Oracle product (Oracle Database 11g Release 1 Enterprise Edition), verify the oraInventory location:
[oracle@oemprod ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

Password Verification Requirements

Ensure that the profile of the Password Verification resource name has the "Default" value. If the Password Verification is enabled, repository creation may fail.

NLS_LANG Environment Variable Requirements

If your operating system is Linux, then ensure the NLS_LANG environment variable (or ORA_NLS10 in my case) is set with a value that is compatible with the operating system default locale setting and the Management Repository database character set.

In this article, I set the ORA_NLS10 environment variable in the .bash_profile log in script for the oracle UNIX account as follows:

export ORA_NLS10=$ORACLE_HOME/nls/data

Grant EXECUTE Privilege on DBMS_RANDOM to DBSNMP

SQL> grant execute on dbms_random to dbsnmp;

Grant succeeded.

Fixed Initialization Parameter Values

The initialization parameters must be set correctly for your certified existing Oracle Database Enterprise Edition, to be able to create a Management Repository. You should also set all fixed parameters for your Management Repository database. After making the changes, you must shut down and restart the database.

The following table lists the parameters and their fixed values that must be met for successful Management Repository database creation. These parameters are verified by Oracle Universal Installer prerequisite checks during installation.

Fixed Initialization Parameter Values
Parameter Value
job_queue_processes 10
db_block_size 8192
timed_statistics TRUE
open_cursors 300
session_cached_cursors 200
aq_tm_processes 1
compatible <currently installed Oracle Database release> (default)
undo_management AUTO
undo_retention 10800
undo_tablespace <any acceptable name>
processes 150
log_buffer 1048576
statistics_level TYPICAL (Note that this value is specific only to Enterprise Manager 10g Repository Database release and later.)
TEMP space (Tablespace) 50 MB (extending to 100 MB)
_b_tree_bitmap_plans false (hidden parameter)

For example, I needed to make the following modifications:

SQL> alter system set session_cached_cursors=200 scope=spfile;

System altered.

SQL> alter system set aq_tm_processes=4 scope=spfile;

System altered.

SQL> alter system set sga_target=1012M scope=spfile;

System altered.

SQL> alter system set sga_max_size=1012M scope=spfile;

System altered.

SQL> alter system set undo_retention=10800 scope=spfile;

System altered.

SQL> alter system set memory_target=1331200000 scope=spfile;

System altered.

SQL> alter system set db_cache_size=384M scope=spfile;

System altered.

SQL> alter system set shared_pool_size=512M scope=spfile;

System altered.

SQL> alter system set pga_aggregate_target=256M scope=spfile;

System altered.

SQL> alter system set "_b_tree_bitmap_plans"=false scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup open
ORACLE instance started.

Total System Global Area 1058779136 bytes
Fixed Size                  1318084 bytes
Variable Size             545260348 bytes
Database Buffers          507510784 bytes
Redo Buffers                4689920 bytes
Database mounted.
Database opened.


Create Oratab Entries

Prepare the Enterprise Manager 10g Grid Control environment by creating the following entries in the /etc/oratab file:
[root@oemprod ~]# echo oms10g:/u01/app/oracle/product/oms10g:N >> /etc/oratab
[root@oemprod ~]# echo agent10g:/u01/app/oracle/product/agent10g:N >> /etc/oratab
[root@oemprod ~]# echo db10g:/u01/app/oracle/product/11.1.0/db_1:N >> /etc/oratab
[root@oemprod ~]# chown oracle:oinstall /etc/oratab
[root@oemprod ~]# chmod 664 /etc/oratab
Verify /etc/oratab entries:
[oracle@oemprod ~]$ cat /etc/oratab | grep '^[^#]'
emrep:/u01/app/oracle/product/11.1.0/db_1:Y
oms10g:/u01/app/oracle/product/oms10g:N
agent10g:/u01/app/oracle/product/agent10g:N
db10g:/u01/app/oracle/product/11.1.0/db_1:N



Install Enterprise Manager Base Version 10.2.0.1

Download and install Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) to the server using the "Installing Software-Only and Configuring Later" (Silent Mode) method.

Download Oracle Enterprise Manager Release 2 Software

Download the Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) software for Linux x86 (or Oracle Enterprise Manager 10g Grid Control Release 3 (10.2.0.3) software for Linux x86_64 if you are using a 64-bit O/S) from the Oracle Technology Network (OTN).

  If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!

Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

  Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) for Linux x86

  Oracle Enterprise Manager 10g Grid Control Release 3 (10.2.0.3) for Linux x86-64

As the "oracle" user account, extract the three archived files (I'm using the 32-bit version) you downloaded to a temporary directory. In this example, I will use /home/oracle/software/grid_control/oem_r2.

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r2
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk1.zip
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk2.zip
[oracle@oemprod oem_r2]$ unzip Linux_Grid_Control_full_102010_disk3.zip


Perform Prerequisite Checks using the Oracle Universal Installer (as oracle)

You can run the prerequisite checker in standalone mode prior to starting the runInstaller. This helps you identify and resolve issues that might otherwise cause the installation to fail.

[oracle@oemprod ~]$ /home/oracle/software/grid_control/oem_r2/install/runInstaller \
-prereqchecker PREREQ_CONFIG_LOCATION=/home/oracle/software/grid_control/oem_r2/rdbms/Disk1/stage/prereq \
-entryPoint oracle.sysman.top.em_seed_Core -prereqLogLoc /home/oracle -silent

Starting Oracle Prerequisite Checker...

Checking installer requirements...

Checking operating system version: must be redhat-3, redhat-4 or SuSE-9
                                      Passed

Checking for Kernel version 2.4.21     Passed
Checking for glibc version glibc-2.3.2-95.3     Passed
Checking swap space: must be greater than 150 MB.   Actual 4367 MB    Passed

All installer requirements met.

........ <SNIP> ........

Checking for shmmax=2147483648; found shmmax=536870912. Failed <<<<

........ <SNIP> ........

Check complete: Passed
=======================================================================
PrereqChecks complete

The above prerequisite check will fail while attempting to verify the value of the kernel parameter shmmax. This can be safely ignored. Although the operating system is RHEL 5, the Prerequisite Checker assumes the O/S is redhat-3:

...
Expected result: One of redhat-3,redhat-4,SuSE-8,SuSE-9
Actual Result: redhat-3
...
Under RHEL 3, the minimum value for shmmax is 2147483648 while under RHEL 5, the minimum value is 536870912.

[oracle@oemprod ~]$ /home/oracle/software/grid_control/oem_r2/install/runInstaller \
-prereqchecker PREREQ_CONFIG_LOCATION=/home/oracle/software/grid_control/oem_r2/rdbms/Disk1/stage/prereq \
-entryPoint oracle.sysman.top.oms_Core -prereqLogLoc /home/oracle -silent

Starting Oracle Prerequisite Checker...

Checking installer requirements...

Checking operating system version: must be redhat-3, redhat-4 or SuSE-9
                                      Passed

Checking for Kernel version 2.4.21     Passed
Checking for glibc version glibc-2.3.2-95.3     Passed
Checking swap space: must be greater than 150 MB.   Actual 4366 MB    Passed

All installer requirements met.

........ <SNIP> ........

Check complete: Passed
=======================================================================
PrereqChecks complete


Prepare Response File for Silent Install

Installing Enterprise Manager 10g Grid Control and the Release 5 patch set will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages several response files with the Enterprise Manager Grid Control software in the <SoftwareStagingDir>/response directory which can be customized and used to perform silent installs.

To install Enterprise Manager 10g Grid Control using an existing database, customize the response file em_using_existing_db.rsp (after, of course, making a backup of the original file).

Backup and then edit the response file em_using_existing_db.rsp specifying all the parameters required for a successful installation. To understand the mandatory parameters you need to specify, see the table below which includes a column (Example Value) indicating the values I used for this install. The response file contains a complete description for each of the parameters listed in the table.

[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r2/response
[oracle@oemprod response]$ cp em_using_existing_db.rsp em_using_existing_db.rsp.backup
[oracle@oemprod response]$ vi em_using_existing_db.rsp

Parameters to Modify in em_using_existing_db.rsp File
Parameter Example Value
UNIX_GROUP_NAME "oinstall"
FROM_LOCATION "/home/oracle/software/grid_control/oem_r2/oms/Disk1/stage/products.xml"
BASEDIR "/u01/app/oracle/product"
INSTALLATION_NAME "oms10g"
s_reposHost "oemprod.idevelopment.info"
s_reposPort "1521"
s_reposSID "emrep"
s_reposDBAPwd "emgc10g"
s_mgmtTbsName "/u02/oradata/EMREP/datafile/mgmt.dbf"
s_ecmTbsName "/u02/oradata/EMREP/datafile/mgmt_ecm_depot1.dbf"
b_emailSelected true
s_emailAddress "jhunter@idevelopment.info"
s_emailServer "localhost"
s_securePassword "emgc10g"
s_securePasswordConfirm "emgc10g"
b_lockedSelected false
s_reposPwd "emgc10g"
s_reposPwdConfirm "emgc10g"

  When modifying values in the response file, ensure to use double quotes ("") or curly braces ({}) where indicated. Omission of these character string conditioners may lead to errors like the listener port number being inserted as a null value instead instead of 1521 (as in the example above), leading to failure which can be difficult to diagnose without detailed log review and a need to start the entire process over.


Example Response File

  em_using_existing_db.rsp


Install Enterprise Manager 10.2.0.1

After preparing the response file em_using_existing_db.rsp, log in as the oracle user account and invoke the runInstaller.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r2

[oracle@oemprod oem_r2]$ ./runInstaller -noconfig -ignoreSysPrereqs -silent \
-responseFile /home/oracle/software/grid_control/oem_r2/response/em_using_existing_db.rsp \
use_prereq_checker=false

  The base product release will be logged by the Oracle Universal Installer in two installActions<LATEST_TIME_STAMP>.log files and two silentInstall<LATEST_TIME_STAMP>.log files in the oraInventory/logs directory. For example:
/u01/app/oraInventory/logs/installActions2009-05-03_02-28-04AM.log
/u01/app/oraInventory/logs/silentInstall2009-05-03_02-28-04AM.log
/u01/app/oraInventory/logs/installActions2009-05-03_02-32-43-AM.log
/u01/app/oraInventory/logs/silentInstall2009-05-03_02-32-43-AM.log
The above four log files will also be copied to the directories $ORACLE_BASE/product/oms10g/cfgtoollogs/oui and $ORACLE_BASE/product/agent10g/cfgtoollogs/oui respectively. For example:
$ORACLE_BASE/product/oms10g/cfgtoollogs/oui/installActions2009-05-03_02-28-04AM.log
$ORACLE_BASE/product/oms10g/cfgtoollogs/oui/silentInstall2009-05-03_02-28-04AM.log
$ORACLE_BASE/product/agent10g/cfgtoollogs/oui/installActions2009-05-03_02-32-43-AM.log
$ORACLE_BASE/product/agent10g/cfgtoollogs/oui/silentInstall2009-05-03_02-32-43-AM.log

At the end of the installation process, log in as the root user in a new command session and run the scripts on the host where the base release of Enterprise Manager Grid Control is installed, when prompted by the installer.

For the purpose of this article, Enterprise Manager Grid Control was not the first Oracle product installed to this server (the first Oracle product installed on this server was Oracle Database 11g). Therefore, the installer will not prompt you to run the /u01/app/oraInventory/orainstRoot.sh script as this was already performed during the database software installation. You are, however, prompted to run the allroot.sh script:

[root@oemprod ~]# /u01/app/oracle/product/oms10g/allroot.sh


Install Enterprise Manager 10g Grid Control Release 2 Screen Output...



Patch the Enterprise Manager Installation to 10.2.0.5

Apply the Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) patchset to the previously installed Oracle Enterprise Manager 10g Grid Control Release 2 (10.2.0.1) base release. As done with the base release install, applying the Release 5 patch set will be performed using the "Installing Software-Only and Configuring Later" (Silent Mode) method.

Download Oracle Enterprise Manager Release 5 Software

Download the Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) software for Linux x86 (or x86_64 if you are using a 64-bit O/S) from the Oracle Technology Network (OTN).

  If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!

Oracle offers a development and testing license free of charge. No support, however, is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

  Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86

  Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86-64

As the "oracle" user account, extract the two archived files (I'm using the 32-bit version) you downloaded to a temporary directory. In this example, I will use /home/oracle/software/grid_control/oem_r5.

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5

[oracle@oemprod oem_r5]$ unzip gc_10205_part1of2.zip
Archive:  gc_10205_part1of2.zip
 extracting: 3731596.zip
 extracting: 3822442.zip
  inflating: README.txt
   creating: doc/
  inflating: doc/BugList_EMGC_10.2.0.5.pdf
  inflating: doc/ReleaseNotes_EMGC_10.2.0.5.html
  inflating: doc/ReleaseNotes_EMGC_10.2.0.5.pdf
  inflating: doc/BugList_EMGC_10.2.0.5.html

[oracle@oemprod oem_r5]$ unzip gc_10205_part2of2.zip
Archive:  gc_10205_part2of2.zip
 extracting: p3731593_10205_LINUX.zip

[oracle@oemprod oem_r5]$ unzip p3731593_10205_LINUX.zip
  The ZIP file p3731593_10205_LINUX.zip contains the 10.2.0.5 patch set software which will be used for:

  • Upgrading Oracle Management Service Release 2 (10.2.0.x) or higher to Oracle Management Service Release 5 (10.2.0.5)
  • Upgrading Oracle Management Repository (sysman schema)
  • Upgrading Oracle Management Agent on the host where OMS is running.

Also note that this process will not upgrade the database in which the Management Repository (sysman schema) resides. The database will remain at Oracle Database 10g Release 1 (10.1.0.4) even if you upgrade Grid Control to any higher release using the patch sets. The Oracle Database does not get upgraded unless it is performed separately outside of the Grid Control installation.


Stop OPMN Processes

Before starting the Enterprise Manager 10.2.0.5 patch set installation, stop all the OPMN processes by running the following command from the Oracle home directory of the OMS (for example, oms10g):
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...


Prepare Response File for OMS Silent Install

Applying the Enterprise Manager 10g Grid Control Release 5 patch set for OMS will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages a response file named patchset.rsp with the patch set software in the <PatchSoftwareStagingDir>/response directory which can be customized and used to perform silent installs.

Create a copy of the patchset.rsp response file and modify the six values indicated in the table below:

[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response
[oracle@oemprod response]$ cp patchset.rsp oms_patchset.rsp
[oracle@oemprod response]$ vi oms_patchset.rsp

Parameters to Modify in oms_patchset.rsp File
Parameter Example Value
FROM_LOCATION "/home/oracle/software/grid_control/oem_r5/3731593/Disk1/stage/products.xml"
ORACLE_HOME "/u01/app/oracle/product/oms10g"
b_softwareonly true
s_sysPassword "emgc10g"
sl_pwdInfo { "emgc10g" }
oracle.iappserver.st_midtier:szl_InstanceInformation { "emgc10g" }


Example Response File

  oms_patchset.rsp


Apply the 10.2.0.5 Patch Set to OMS

After preparing the response file oms_patchset.rsp, apply the 10.2.0.5 patch set to the Oracle home directory of the Oracle Management Service. For the purpose of this article, the Oracle home directory of the Oracle Management Service is /u01/app/oracle/product/oms10g.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1

[oracle@oemprod Disk1]$ ./runInstaller -noconfig -silent \
-responseFile /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response/oms_patchset.rsp

  Note that during the Grid Control base release installation (10.2.0.1), we used the "-ignoreSysPrereqs" argument because it was being installed on a non-supported operating system (RHEL 5). Since 10.2.0.5 is supported on RHEL 5, OL5, and SuSE10, do not include the "-ignoreSysPrereqs" argument so you can verify the prerequisite checks are successful.

At the end of the installation process, verify there were no errors in the installActions<LATEST_TIME_STAMP>.log log file which can be found in the oraInventory/logs directory. The log file will have a later timestamp than the log files created for the Grid Control base installation. For example:

/u01/app/oraInventory/logs/installActions2009-05-03_01-50-03PM.log
Next, log in as the root user in a new command session and run the root.sh script when prompted by the installer.
[root@oemprod ~]# /u01/app/oracle/product/oms10g/root.sh
Note that the root.sh script will not produce any output.


Install Enterprise Manager 10g Grid Control Release 5 (OMS) Screen Output...


Prepare Response File for the Management Agent Silent Install

Applying the Enterprise Manager 10g Grid Control Release 5 patch set for the Oracle Management Agent will be performed using the Silent Mode option of the Oracle Universal Installer. Oracle packages a response file named patchset.rsp with the patch set software in the <PatchSoftwareStagingDir>/response directory which can be customized and used to perform silent installs.

Create a copy of the patchset.rsp response file and modify the five values indicated in the table below:

[oracle@oemprod response]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response
[oracle@oemprod response]$ cp patchset.rsp agent_patchset.rsp
[oracle@oemprod response]$ vi agent_patchset.rsp

Parameters to Modify in agent_patchset.rsp File
Parameter Example Value
FROM_LOCATION "/home/oracle/software/grid_control/oem_r5/3731593/Disk1/stage/products.xml"
ORACLE_HOME "/u01/app/oracle/product/agent10g"
b_softwareonly true
s_sysPassword "emgc10g"
sl_pwdInfo { "emgc10g" }


Example Response File

  agent_patchset.rsp


Apply the 10.2.0.5 Patch Set to Management Agent

After preparing the response file agent_patchset.rsp, apply the 10.2.0.5 patch set to the Oracle home directory of the Management Agent. For the purpose of this article, the Oracle home directory of the Management Agent is /u01/app/oracle/product/agent10g.
[root@oemprod ~]# su - oracle

[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ cd /home/oracle/software/grid_control/oem_r5/3731593/Disk1

[oracle@oemprod Disk1]$ ./runInstaller -noconfig -silent \
-responseFile /home/oracle/software/grid_control/oem_r5/3731593/Disk1/response/agent_patchset.rsp


At the end of the installation process, verify there were no errors in the installActions<LATEST_TIME_STAMP>.log log file which can be found in the oraInventory/logs directory. The log file will have a later timestamp than the log files created for the Grid Control base installation. For example:

/u01/app/oraInventory/logs/installActions2009-05-03_02-33-07PM.log
Next, log in as the root user in a new command session and run the root.sh script when prompted by the installer.
[root@oemprod ~]# /u01/app/oracle/product/agent10g/root.sh
Finished product-specific root actions.


Install Enterprise Manager 10g Grid Control Release 5 (Management Agent) Screen Output...



Configure Grid Control Installation using ConfigureGC.pl

At this point, all of the software required for Oracle Enterprise Manager 10g Grid Control Release 5 has been installed and linked. The final major step is to configure the Grid Control installation using the Perl script ConfigureGC.pl. The ConfigureGC.pl Perl script was included as part of the Oracle Management Service (OMS) install.

Verify 'execute' Permissions on runConfig.sh

Make certain that the $ORACLE_BASE/product/oms10g/oui/bin/runConfig.sh script has 'execute' permissions:
[oracle@oemprod ~]$ ls -l $ORACLE_BASE/product/oms10g/oui/bin/runConfig.sh
-rwxrwxr-x 1 oracle oinstall 1159 May  3 13:51 /u01/app/oracle/product/oms10g/oui/bin/runConfig.sh*


Set PERL5LIB Environment Variable

The PERL5LIB environment variable will need to be set before running the ConfigureGC.pl configure script. Before assigning the environment variable, back up its current value (if any):
[oracle@oemprod ~]$ export PERL5LIB_BACKUP=$PERL5LIB
Next, assign the PERL5LIB environment variable to the Perl modules found in the OMS home directory:
[oracle@oemprod ~]$ export PERL5LIB=$ORACLE_BASE/product/oms10g/perl/lib/5.6.1


Run ConfigureGC.pl

Finally, run the ConfigureGC.pl script to configure the Grid Control installation. The formal syntax is:
$ORACLE_OMS_HOME/perl/bin/perl $ORACLE_OMS_HOME/sysman/install/ConfigureGC.pl <OEM Parent Directory>
Verify your environment is set for OMS and run the ConfigureGC.pl script:
[oracle@oemprod ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/oms10g

[oracle@oemprod ~]$ echo $PERL5LIB
/u01/app/oracle/product/oms10g/perl/lib/5.6.1

[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product

After starting the configuration script, a number of log files will begin populating the $ORACLE_HOME/cfgtoollogs/cfgfw/ directory with the results of each configuration action.

The configuration process may take an hour or more to run with very little output at times (except for the likely Oracle Bug that halts the script!). It may be helpful to tail the log files listed below to follow the progress of the configuration:

$ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_<LATEST_TIME_STAMP>.log - (OMS configuration assistant's details)
$ORACLE_HOME/sysman/log/emrepmgr* - (Repository upgrade process

  ConfigureGC.pl Reports - Invalid Username/Password.

Metalink Doc ID: 602750.1
Bug: 7137054

Within 5 - 10 minutes of running the ConfigureGC.pl script, it will eventually issue a failure message indicating to look in the $ORACLE_HOME/cfgtoollogs/oui/configActions<LATEST_TIME_STAMP>.log log file for errors. Don't bother. The only message written to this log is utterly useless:

The plug-in OMS Configuration has failed its perform method
The two files listed below, on the other hand, will both show the Oracle error code ORA-01017:
$ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_<LATEST_TIME_STAMP>.log
$ORACLE_HOME/cfgtoollogs/cfgfw/emca_repos_drop<LATEST_TIME_STAMP>_OUT.log
For example:
Getting temporary tablespace from database...
Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=oemprod.idevelopment.info)(PORT=1521)))(CONNECT_DATA=(SID=emrep))): 
ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
Solution

To work around this bug, log in to the management repository as either SYS or SYSTEM to change the SYS password to "default":

[oracle@oemprod ~]$ sqlplus sys/emgc10g@emrep as sysdba

SQL> alter user sys identified by "default";
After changing the SYS password to "default", run the ConfigureGC.pl again using same syntax. The configuration will pick up where it left off, so repository configuration will be successful, the base OMS configuration will complete, the management agent configuration will complete and the patch set configuration actions will start.
[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl \
$ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product
Second Failure

So, you thought you seen the last of Oracle Bug 7137054? Not quite. The configuration will fail yet again and indicate to look in the new $ORACLE_HOME/cfgtoollogs/oui/configActions<LATEST_TIME_STAMP>.log log file for errors. This log file is just as useless as it was the first time. Further examining the $ORACLE_HOME/cfgtoollogs/cfgfw/CfmLogger_<LATEST_TIME_STAMP>.log will show the same ORA-01017 error.

To work around this second error, log in to the management repository database (again) to change the SYS password back to its original value configured in the em_using_existing_db.rsp response file:

[oracle@oemprod ~]$ sqlplus sys/default@emrep as sysdba

SQL> alter user sys identified by emgc10g;
Run the configuration script for a third time, repeating the same syntax as before:
[oracle@oemprod ~]$ $ORACLE_HOME/perl/bin/perl \
$ORACLE_HOME/sysman/install/ConfigureGC.pl /u01/app/oracle/product


The configuration script should now finish successfully. The screen output from a successful configuration should be similar to the following:

perform - mode finished for action: patchsetConfigure

You can see the log file: /u01/app/oracle/product/oms10g/cfgtoollogs/oui/configActions2009-05-03_07-51-02-PM.log

10.2.0.5  OMS patch configuration  done


Configure Enterprise Manager 10g Grid Control Release 5 Screen Output...



Verify Grid Control Configuration

After successfully installing and configuring Enterprise Manager Grid Control, verify the OMS, Application Server, and Management Agent components using the steps described in this section.

OPMN Processes

Open a terminal session to the Grid Control server, log in as the oracle user account, set the environment to the OMS Oracle home, and check the OPMN processes:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl status

Processes in Instance: EnterpriseManager0.oemprod
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
DSA                | DSA                |     N/A | Down
HTTP_Server        | HTTP_Server        |    7672 | Alive
LogLoader          | logloaderd         |     N/A | Down
dcm-daemon         | dcm-daemon         |     N/A | Down
OC4J               | home               |    7673 | Alive
OC4J               | OC4J_EMPROV        |    7674 | Alive
OC4J               | OC4J_EM            |    7676 | Alive
WebCache           | WebCache           |    7697 | Alive
WebCache           | WebCacheAdmin      |    7686 | Alive
Everything here looks good!


Grid Control Console

My guess is that the second test you will want to perform is to bring up the Grid Control Console. Open a web browser and use the URL:
http://<GRID_CONTROL_SERVER>:4889/em/
For example,
http://oemprod:4889/em/


Verify 10.2.0.5 Component Version for OMS

To verify the version of the OMS component, use either emctl from the OMS Oracle home or click the "About Oracle Enterprise Manager" link in the Grid Control Console:
[oracle@oemprod ~]$ $ORACLE_HOME/bin/emctl status oms
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Oracle Management Server is Up.


Verify 10.2.0.5 Component Version for Management Agent

To verify the version of the Management Agent component, use either emctl from the Management Agent Oracle home or click "[Setup] --> [Agents]" in the Grid Control Console:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/bin/emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /u01/app/oracle/product/agent10g
Agent binaries    : /u01/app/oracle/product/agent10g
Agent Process ID  : 28110
Parent Process ID : 28094
Agent URL         : https://oemprod:3872/emd/main/
Repository URL    : https://oemprod:1159/em/upload
Started at        : 2009-05-03 19:24:20
Started by user   : oracle
Last Reload       : 2009-05-03 20:27:23
Last successful upload                       : 2009-05-03 21:39:20
Total Megabytes of XML files uploaded so far :    16.76
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    46.29%
Last successful heartbeat to OMS             : 2009-05-03 21:48:27
---------------------------------------------------------------
Agent is Running and Ready




Secure the OMS

After the 10.2.0.5 install and configuration, access to Grid Control is unsecured by default:
[oracle@oemprod ~]$ emctl status emkey
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Please enter repository password: xxxxxxx

The Em Key  is configured properly, but is not secure. 
Secure the Em Key by running "emctl config emkey -remove_from_repos".


Secure OMS

Use the following to secure the OMS:
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl config emkey -remove_from_repos
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Please enter repository password: xxxxxxx

The Em Key has been removed from the Management Repository.
Make a backup copy of OH/sysman/config/emkey.ora file and store it on another machine.
WARNING: Encrypted data in Enterprise Manager will become unusable if the emkey.ora file is lost or corrupted.
[oracle@oemprod ~]$ emctl status emkey
Oracle Enterprise Manager 10g Release 5 Grid Control
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Please enter repository password: xxxxxxx

The Em Key is configured properly.


Secure the Management Agent

Use the following to secure the Management Agent:
[oracle@oemprod log]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl stop agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.

[oracle@oemprod ~]$ emctl secure agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Agent is already stopped...   Done.
Securing agent...   Started.
Enter Agent Registration Password : xxxxxx
Securing agent...   Successful.

[oracle@oemprod ~]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Starting agent ........... started.
[oracle@oemprod ~]$ emctl upload agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

[oracle@oemprod ~]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /u01/app/oracle/product/agent10g
Agent binaries    : /u01/app/oracle/product/agent10g
Agent Process ID  : 29170
Parent Process ID : 29154
Agent URL         : https://oemprod:3872/emd/main/
Repository URL    : https://oemprod:1159/em/upload
Started at        : 2009-05-11 09:16:33
Started by user   : oracle
Last Reload       : 2009-05-11 09:16:33
Last successful upload                       : 2009-05-11 09:17:35
Total Megabytes of XML files uploaded so far :     0.32
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    45.18%
Last successful heartbeat to OMS             : 2009-05-11 09:17:44
---------------------------------------------------------------
Agent is Running and Ready



Starting / Stopping the Grid Control Environment

Stopping Grid Control
  Management Agent
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl stop agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.
  Oracle Management Service (OMS)
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [agent10g] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...
  Database Repository
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Mon May 4 00:07:27 2009

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

[oracle@oemprod ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAY-2009 00:12:26

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemprod)(PORT=1521)))
The command completed successfully


Starting Grid Control

  Database Repository
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [emrep] ? emrep
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

[oracle@oemprod ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 04-MAY-2009 00:16:42

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.7.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oemprod/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemprod)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oemprod)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date                04-MAY-2009 00:16:42
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oemprod/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oemprod)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

[oracle@oemprod ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Mon May 4 00:16:48 2009

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1058779136 bytes
Fixed Size                  1318084 bytes
Variable Size             545260348 bytes
Database Buffers          507510784 bytes
Redo Buffers                4689920 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
  Oracle Management Service (OMS)
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [emrep] ? oms10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/oms10g is /u01/app/oracle

[oracle@oemprod ~]$ $ORACLE_HOME/opmn/bin/opmnctl startall
opmnctl: starting opmn and all managed processes...
  Management Agent
[oracle@oemprod ~]$ . oraenv
ORACLE_SID = [oms10g] ? agent10g
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/agent10g is /u01/app/oracle

[oracle@oemprod ~]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Starting agent ........... started.



Installing Grid Control Management Agent (10.2.0.5)

At this point, Oracle Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) for Linux x86 should be up and running. The environment described in this document installed and configured all three Grid Control components on a single Linux server:

The next logical step is to install and configure the Oracle Management Agent on all of the nodes to be managed and monitored by Grid Control. Oracle Management Agent is one of the integral components of the Enterprise Manager Grid Control architecture. Management Agent will discover, monitor and administer all targets on their hosts, including databases, application servers, other software, and aspects of the hosts themselves. Management Agent communicates with the monitored targets, collects information about their health and performances, transports that information to Oracle Management Service (OMS), which in turn stores the collected details in the central repository created in the Oracle database.

The following document describes the steps to install Oracle Management Agent (10.2.0.5) on a node running an Oracle database which will be monitored by the central Grid Control environment created in this article:

  Installing Grid Control Management Agent (10.2.0.5)



About the Author

Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical database design in a UNIX / Linux server environment. Jeff's other interests include mathematical encryption theory, tutoring advanced mathematics, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 20 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science and Mathematics.



Copyright (c) 1998-2017 Jeffrey M. Hunter. All rights reserved.

All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.

I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.

Last modified on
Friday, 01-Jun-2012 18:09:45 EDT
Page Count: 63997