Thursday, April 19, 2012

Install EM grid 11.1.0.1.0 on Linux


  • Software
Downloads the following software:
(There’s a known issue with installing Enterprise Grid Control on Weblogic 10.3.3)

  • Java Installation
Install Java JDK 6u18 using the following commands as the "root" user. Later version of the JDK cause errors when patching WebLogic (unless you are using a proxy), so the version of the JDK is very important.
# chmod u+x jdk-6u18-linux-x64-rpm.bin
# ./jdk-6u18-linux-x64-rpm.bin

  • Database Installation
Unlike previous Grid Control installations, the database is no longer bundled, so we must install the database software separately.

In addition to the packages listed in the DB installation, the following packages must be installed as the "root" user for WebLogic and the Grid Control to install correctly.
yum install compat-db-*
yum install compat-libstdc++-296*
yum install rng-utils-2*
yum install setarch-2*
yum install tunctl-1.5-3* (Redhat kernel-utils-2.4*)

If you have performed a default installation you will need to deconfigure Enterprise Manager Database Control. Run the following command as the "oracle" user.
$ emca -deconfig dbcontrol db -repos drop -SYS_PWD <sys pasword> -SYSMAN_PWD <sysman password>
Make the following initialization parameter changes.
sqlplus / AS SYSDBA

ALTER SYSTEM SET log_buffer=10485760 SCOPE=SPFILE;
ALTER SYSTEM SET processes=500 SCOPE=SPFILE;
ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
If you have done a default installation as described here, the UNDO tablespace will be autoextensible. If you have done a custom installation make sure the UNDO tablespace is at least 200M in size.
Make sure temp tablespace is at least 20M in size.

Next we must install the latest version of the "opatch" utility.
$ cd /host/software/oracle/GridControl/db_patches
$ unzip -d $ORACLE_HOME p6880880_112000_Linux-x86-64.zip
The documentation states that patches for database bugs 9002336 and 9067282 must be applied. Patch 9002336 has a prerequisite of patch 9352237 (a PSU), which includes patch 9067282, so I have only applied patches 9352237 and 9002336, which can be downloaded from My Oracle Support. The database patches include installation instructions, but to summarize, these commands should be run as the "oracle" user.
Oracle 11.2.0.2 doesn’t require those two patches be installed.
$ dbshut $ORACLE_HOME
$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ cd /host/software/oracle/GridControl/db_patches

$ unzip p9352237_112010_Linux-x86-64.zip
$ cd 9352237
$ opatch apply
$ cd ..

$ unzip p9002336_112011_Linux-x86-64.zip
$ cd 9002336
$ opatch apply
$ cd ..

$ dbstart $ORACLE_HOME
The database installation is now complete..
  • Install weblogic server:
  • Optional: Apply the "WDJ7" patch to the installation by running the Smart Update utility.
$ /u01/app/oracle/Middleware/utils/bsu/bsu.sh
Update the patch client by clicking the "OK" button on the message dialog.
  • Install EM Grid

*.log_buffer=10495760
*.processes=500
Make a note of the URLs on the "Finish" screen, and then click the "Close" button.
Connect to the Grid Control console (https://testdb1.localdomain:7799/em) using the username (SYSMAN) and password defined during the installation, accept the license agreement and you are presented with the console:
This information is also available at:

    /u01/app/oracle/Middleware/oms11g/install/setupinfo.txt

See below for information pertaining to your Enterprise Manager installation:


Use the following URL to access:

    1. Enterprise Manager Grid Control URL: https://testdb1.localdomain:7799/em
    2. Admin Server URL: https://testdb1.localdomain:7101/console

The following details need to be provided during the additional OMS install:

    1. Admin Server Hostname: testdb1.localdomain
    2. Admin Server Port: 7101

NOTE:
An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable. Please run following command to backup the Management Service configuration including the emkey and keep the backup on another system:
emctl exportconfig oms -dir <backup location>


  • Startup/Shutdown
Use the following commands to turn on all components installed by this article.
#!/bin/bash
export OMS_HOME=/u01/app/oracle/Middleware/oms11g
export AGENT_HOME=/u01/app/oracle/Middleware/agent11g

# Start everything
dbstart $ORACLE_HOME

$OMS_HOME/bin/emctl start oms

$AGENT_HOME/bin/emctl start agent
Use the following commands to turn off all components installed by this article.
#!/bin/bash
export OMS_HOME=/u01/app/oracle/Middleware/oms11g
export AGENT_HOME=/u01/app/oracle/Middleware/agent11g

# Stop everything
$OMS_HOME/bin/emctl stop oms -all

$AGENT_HOME/bin/emctl stop agent

dbshut $ORACLE_HOME
For more information see:
Oracle Enterprise Manager Grid Control Advanced Installation and Configuration Guide 11g Release 1 (11.1.0.1.0)

  • Verify the installation:
$ export OMS_HOME=/u01/app/oracle/Middleware/oms11g
$ export AGENT_HOME=/u01/app/oracle/Middleware/agent11g
$ $OMS_HOME/bin/emctl status oms
Oracle Enterprise Manager 11g Release 1 Grid Control  
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 11.1.0.1.0
OMS Version       : 11.1.0.1.0
Protocol Version  : 11.1.0.0.0
Agent Home        : /u01/app/oracle/Middleware/agent11g
Agent binaries    : /u01/app/oracle/Middleware/agent11g
Agent Process ID  : 5029
Parent Process ID : 5012
Agent URL         : https://testdb1.localdomain:3872/emd/main/
Repository URL    : https://testdb1.localdomain:4900/em/upload
Started at        : 2010-10-28 14:21:25
Started by user   : oracle
Last Reload       : 2010-10-28 14:33:14
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :       24
Size of XML files pending upload(MB)         :     9.32
Available disk space on upload filesystem    :    18.81%
Last attempted heartbeat to OMS              : 2010-10-28 14:38:16
Last successful heartbeat to OMS             : unknown
---------------------------------------------------------------
Agent is Running and Ready
$ $AGENT_HOME/bin/emctl upload
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

  • Config database for monitoring:

  1. Unlock account dbsnmp:
$ export ORACLE_SID=emgrid
$ sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 28 14:59:03 2010

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

Enter user-name: / as sysdba

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

SQL> alter user dbsnmp identified by "******" account unlock;

User altered.

SQL>
  1. Configure database in EM Grid Control:


  • Installing Oracle Management Agent Using Agent Deployment Wizard
  1. Setup SSH for all nodes.
  2. Enable sudo on all nodes (Metalink id 837763.1 How To Push Agent With SUDO User Setup At Target Host?):
  • Remove the line “Defaults    requiretty” in /etc/sudoers on the nodes to install.
  • Add the following lines in /etc/sudoers:
    User_Alias      ADMINS = oracle
    ADMINS ALL=ALL
    oracle ALL=(ALL) NOPASSWD: ALL
  1. In Grid Control, click Deployments.
  2. On the Deployments page, from the Agent Installation section, click Install Agent.
  3. On the following page, click Fresh Install.

If you get the following error:
Find the path where sudo exists and modify the value in $OMS_HOME/sysman/prov/resources/sPaths.properties and $OMS_HOME/em/EMGC_OMS1/sysman/prov/resources/sPaths.properties.

If you see the error:
    Add the exception in the firewall for the port and node listed. Sample
    ports i enabled here are:
Status:

Set Preferred Credentials for all nodes :
  • Installing Oracle Management Agent Using agentDownload(Silent mode)
Make a copy of additional_agent.rsp and make the following changes:
SECURITY_UPDATES_VIA_MYORACLESUPPORT=False
DECLINE_SECURITY_UPDATES=true
ORACLE_AGENT_HOME_LOCATION=c:\oracle
OMS_HOST=192.168.96.3
OMS_PORT=4900
AGENT_REGISTRATION_PASSWORD=*******

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false don't use my oracle support to update
DECLINE_SECURITY_UPDATES=true Don't update
ORACLE_AGENT_HOME_LOCATION=$ORACLE_BASE/OracleHomes/agent11g Agent instalation location
OMS_HOST=omsserver OMS server name
OMS_PORT=4889 port for OMS Server Upload
AGENT_REGISTRATION_PASSWORD=iamENCY3 OMS Server password

Make sure the ports 1830~1849 is open
Make sure host file correct if you’re not using DNS.
Run command:
./runInstaller -silent -responseFile c:\additional_agent.rsp

If you modified the timezone setting in the environment, please stop the agent and exectute 'emctl resetTZ agent' and also execute the script mgmt_target.set_agent_tzrgn(<agent_name>, <new_tz_rgn>) to get the value propagated to repository.
This can be done for example by logging into sqlplus and doing
SQL> exec mgmt_target.set_agent_tzrgn('testdb1.localdomain:3872','-05:00')
SQL> commit

If you get the error “EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.” When uploading agent:
- emctl stop agent
- delete all files in $AGENT_HOME/sysman/emd/upload and $AGENT_HOME/sysman/emd/state
- emctl clearstate agent (this should delete all state files but sometimes it is not enough, but I experienced that it is better to use this command after deletion of the files)
- emctl secure agent (and specify the password on demand)
- emctl start agent

If you do not know the registration password but have sysman access to the system you can create a new registration password: Click on setup->registration passwords (left column) and then create a new reigstration password.

No comments:

Post a Comment