EM Grid Control 10.2.0.5のインストレーション(On Linux 5.x)

1. EM Grid Controの仕組み

1.1 コンポーネント構成
  • Management Service(OMS)
  • Management Repository(OMR)
  • Management Agent(OMA)
1.2 Grid Controlの処理フロー
  1. OMAは$AGENT_HOME/sysman/admin/scripts/*.plというPerlスクリプトで管理するローカルサーバーの情報を収集する。
  2. 収集された情報をXMLの形式で$AGENT_HOME/sysman/admin/uploadに格納する。
  3. OMSにXMLベースの情報をアップロードする。
  4. Management Service(OMS)は受け取った情報をManagement Repository(OMR)に書き込む。

Agentの設定ファイル
$AGENT_HOME/sysman/emd/targets.xml 監視ターゲット定義
$AGENT_HOME/sysman/config/emd.properties 属性設定

2. Management Service(OMS)のインストレーション事前準備

2.1 インストール環境

Oracle Enterprise Linux 5.2
Oracle Database 11.1.0.7(OMR)
Oracle Enterprise Manager Grid Control 10.2.0.5(OMS)
インストールタイプ:既存の11g リポジトリDBを利用する。

2.2 Management Repository(OMR) Databaseを作成
  1. dbcaのカスタム・データベースで作成。
  2. Enterprise Managerの構成をチェックしない。
  3. データベース・コンポーネントの選択画面でEnterprise Managerリポジトリを外す。

SYSDBAでログインしてdbmspool.sqlを実行

@?/rdbms/admin/dbmspool.sql
commit;

初期化パラメータの要件
job_queue_processes = 10
db_block_size = 8192
timed_statistics = TRUE
open_cursors = 300
session_cached_cursors = 200
aq_tm_processes = 1
2.3 Oracle Enterprise Linux 5 パッケージとカーネル要件

詳細についてはOracleマニュアルを参照してください
パッケージ要件

make-3.79
binutils-2.14
gcc-3.2

カーネル要件
semmsl = 250
semmsl2 = 250
semmns = 32000
semopm = 100
semmni = 128
shmmax = 536870912
shmmni = 4096
shmall = 2097152
filemax = 65536
ip_local_port_range = 1024 65000
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144

3. Management Service 10.2.0.5(Grid Control R5)のインストレーション

Enterprise Manager Grid Controlが以下の新たなプラッドフォームをサポートする。

Oracle Enterprise Linux (OEL) 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

但し、上記のプラッドフォームをサポートするのは10g Grid Control Release 5 (10.2.0.5)となる。10g Grid Control Release 5 (10.2.0.5)がパッチセットなので、直接にインストールできない。そのため、Oracle Enterprise Linux 5.xで下記の手順でGrid Control 10.2.0.5をインストールする。
  1. 後でコンフィグレーションするように先にGrid Control 10.2.0.3以下ソフトウエアのみをインストールする(Silent Mode)。
  2. Grid Control 10.2.0.5のパッチを適用する(Silent Mode)。
  3. コンフィグレーションをする(Silent Mode)。
3.1 Silent ModeでGrid Control 10.2.0.1のソフトウエアのみをインストール(Software-Only)
Grid Control 10.2.0.1のソフトウエアを用意する。

試用版: http://www.oracle.com/technology/global/jp/software/products/em10g/index.html

/usr/lib/libdb.so.2が存在しなければ、リンクを作成する(ONLY FOR Oracle Enterprise Linux (OEL) 5.X and Red Hat Enterprise Linux 5.X)。
ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
em_using_existing_db.rspの編集

既存の11g DBをリポジトリとして利用するために予めem_using_existing_db.rspを編集しておく必要がある。
<DVD>/response/em_using_existing_db.rspをローカルホストに移動。

[response oracle()] pwd
/u01/app/oracle/soft/gc/10.2.0.1/response
[response oracle()] cp em_using_existing_db.rsp ~/work/

em_using_existing_db.rspにある以下のエントリを編集する。
# Specify the complete path to the products.xml file. 
FROM_LOCATION="../oms/Disk1/stage/products.xml"
# Specify the directory where the ORACLE_HOME directories must be created.
BASEDIR="/u01/app/oracle/oem_home"
# Specify the name to be used for creating the Oracle home directories.
INSTALLATION_NAME="oem_home"
# Specify the name of the host where the database, 
# which houses the Management Repository, is running.
s_reposHost="db-node02"
# Specify the port on which the database, which houses the Management Repository, is running. s_reposPort="1521".
s_reposPort="1521"
# Specify the SID or Service name of the database, which houses the Management Repository. 
s_reposSID="OMR"
# Specify the DBA user account password (SYS user) 
# that must be used for creating the repository schema.
s_reposDBAPwd="oracle"
# Specify the full path to the location 
# where the data file for management tablespace (mgmt.dbf) can be stored.
s_mgmtTbsName=/u01/app/oracle/oradata/OMR/mgmt.dbf
# Specify the full path to the location 
# where the data file for configuration data tablespace (mgmt_ecm_depot1_.dbf) can be stored.
s_ecmTbsName=/u01/app/oracle/oradata/OMR/mgmt_ecm_depot1.dbf
# Specify the registration password for securing the communication between OMS and its Agents.
s_securePassword="oracle1"
# Confirmation of password for secure communication with Management Server
s_securePasswordConfirm="oracle1"
# Whether agent communication should be locked
b_lockedSelected=true
# Password of repository schema owner
s_reposPwd="oracle1"
# Specify the passwords again for confirmation.
s_reposPwdConfirm="oracle1"
# Languages in which the components will be installed.
COMPONENT_LANGUAGES={"en","ja"}

runInstallerを起動してSilent ModeでGrid Control 10.2.0.1のソフトウエアのみをインストール。
[stage oracle()] cd /u01/app/oracle/soft/gc/10.2.0.1/
[stage oracle()] ./runInstaller -noconfig -ignoreSysPrereqs -silent 
-responseFile /home/oracle/work/em_using_existing_db.rsp use_prereq_checker=false

Silent ModeでGrid Control 10.2.0.1のソフトウエアのみをインストールした時のログ
rootユーザーでコンフィグレーションスクリプトを実行する。
[root@db-node02 ~]# /u01/app/oracle/oem_home/oms10g/allroot.sh
3.2 Grid Control 10.2.0.5(OMS)のパッチセットをインストール

すべてのOPMNプロセスを停止する。

[10.2.0.5 oracle()] /u01/app/oracle/oem_home/oms10g/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...
[10.2.0.5 oracle()]

<Patch Set DVD>/responseからpatchset.rspをローカルホストにコピー
[response oracle()] pwd
/u01/app/oracle/soft/gc/10.2.0.5/3731593/Disk1/response
[response oracle()] cp patchset.rsp ~/work/
[response oracle()]

patchset.rspを下記のように修正する。
b_softwareonly=true
s_sysPassword="oracle"
ORACLE_HOME="/u01/app/oracle/oem_home/oms10g"
oracle.iappserver.st_midtier:szl_InstanceInformation={ "oracle1" }

oracle.iappserver.st_midtier:szl_InstanceInformationはOAS10gのパスワードとなる。Grid Control 10.2.0.1をインストールした時に指定されたSYSMANのパスワードと同一である。このパスワードを変えるなら、以下のコマンドで実行できる。
$ORACLE_HOME/bin/emctl set password <Old ias_admin password> <New ias_admin Password>

runInstallerを起動してSilent ModeでGrid Control 10.2.0.5パッチセットのソフトウエアのみをインストール。
[Disk1 oracle()] cd /u01/app/oracle/soft/gc/10.2.0.5/3731593/Disk1
[Disk1 oracle()] ./runInstaller -noconfig -silent -responseFile /home/oracle/work/patchset.rsp

Grid Control 10.2.0.5(OMS)パッチセットのインストレーションログ

rootユーザーでroot.shを実行(ONLY FOR 10.2.0.5.0 OR HIGHER RELEASE)

[root@db-node02 ~]# /u01/app/oracle/oem_home/oms10g/root.sh
3.3 Management Agent 10.2.0.5(OMA)のパッチセットをインストール

上記3.2のpatchset.rspのORACLE_HOMEを編集する。

ORACLE_HOME="/u01/app/oracle/oem_home/agent10g"

runInstallerを起動してSilent ModeでManagement Agent 10.2.0.5(OMA)パッチセットのソフトウエアのみをインストール。
[Disk1 oracle()] cd /u01/app/oracle/soft/gc/10.2.0.5/3731593/Disk1
[Disk1 oracle()] ./runInstaller -noconfig -silent -responseFile /home/oracle/work/patchset.rsp

Management Agent 10.2.0.5(OMA)パッチセットのインストレーションログ

rootユーザーでroot.shを実行(ONLY FOR 10.2.0.5.0 OR HIGHER RELEASE)

[root@db-node02 ~]# /u01/app/oracle/oem_home/agent10g/root.sh

3.4 OMSのコンフィグレーション
PERL5LIB 環境変数を設定する。

[Disk1 oracle()] export PERL5LIB=/u01/app/oracle/oem_home/oms10g/perl/lib/5.6.1

OMSのコンフィグレーション
$ORACLE_HOME/perl/bin/perl <ORACLE HOME>/sysman/install/ConfigureGC.pl <INSTALL_BASE_DIRECTORY>
※ For example, if the Oracle home directory of OMS is /usr/oracle/gc/oms10g, then <INSTALL_BASE_DIRECTORY> must be /usr/oracle/gc.
[Disk1 oracle()] /u01/app/oracle/oem_home/oms10g/perl/bin/perl /u01/app/oracle/oem_home/oms10g/sysman/install/ConfigureGC.pl 
/u01/app/oracle/oem_home

Base Directory: /u01/app/oracle/oem_home

 Starting ito execute Configuration Assistants: 

Running the configuration assistants using the following command:
...

コンフィグレーションの間にエラーが出て失敗した。
CfmLogger_.logを調べてみた。
[cfgfw oracle()] cat CfmLogger_2009-11-12_03-28-02-PM.log
......
INFO: oracle.sysman.top.oms:Internal PlugIn for {Micro Step state:step:2:configuration in CfmAggregateInstance: 
oracle.sysman.top.oms:10.2.0.1.0:common:family=CFM:oh=/u01/app/oracle/oem_home/oms10g:label=2} failed with an unhandled exception:
java.lang.Exception: RepManager Drop Repository Error = 50. Please check the log file at /u01/app/oracle/oem_home/oms10g/sysman
/log/emca_repos_drop15_35_12.log
        at oracle.sysman.emcp.util.EmcpPlug.startProcessing(EmcpPlug.java:389)
        at oracle.sysman.emcp.util.EmcpPlug.invoke(EmcpPlug.java:360)
        at oracle.sysman.emCfg.core.PerformMicroStep.runJavaClass(PerformMicroStep.java:540)
        at oracle.sysman.emCfg.core.PerformMicroStep.executeMicroStep(PerformMicroStep.java:120)
        at oracle.sysman.emCfg.core.ActionPerformer.performMicroStep(ActionPerformer.java:917)
        at oracle.sysman.emCfg.core.ActionPerformer$Performer.run(ActionPerformer.java:1038)

INFO: oracle.sysman.top.oms:The plug-in OMS Configuration has failed its perform method
INFO: Cfm.save() was called
INFO: Cfm.save(): 15 aggregate instances saved
INFO: done waiting for Action from 15:28:05.200
[cfgfw oracle()]

上記のログの詳細に提示された/u01/app/oracle/oem_home/oms10g/sysman/log/emca_repos_drop15_35_12.logを確認
[cfgfw oracle()] cat /u01/app/oracle/oem_home/oms10g/sysman/log/emca_repos_drop15_35_12.log
[12-11-2009 15:35:14] Enter SYS user's password : 
[12-11-2009 15:35:14] 
[12-11-2009 15:35:14] Getting temporary tablespace from database...
[12-11-2009 15:35:17] Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=db-node02)(PORT=1521)))
(CONNECT_DATA=(SID=OMR))): ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
[cfgfw oracle()]

上記はOracleのバグ(BUG 7483221)となる。対応方法は以下のようにSYSユーザーのパスワードをデフォルトにする。
OMR(SYS)> ALTER USER sys IDENTIFIED BY default;

User altered.

OMR(SYS)>

SYSユーザーをデフォルトに変更した後、再度コンフィグレーションを実行する。
しばらくまたエラーが出た!
INFO: oracle.sysman.top.oms:EmcpPlug:invoke:Completed EmcpPlug invoke method on an aggregate=oracle.sysman.top.oms for 
Action=patchsetConfiguration in step=1:microstep=0
INFO: oracle.sysman.top.oms:Internal PlugIn for {Micro Step state:step:1:patchsetConfiguration in CfmAggregateInstance: 
oracle.sysman.top.oms:10.2.0.5.0:common:family=CFM:oh=/u01/app/oracle/oem_home/oms10g:label=3} failed with an unhandled exception:
java.lang.Exception: 
 Error occured while connecting to Repository ...

        at oracle.sysman.emcp.util.EmcpPlug.startProcessing(EmcpPlug.java:389)
        at oracle.sysman.emcp.util.EmcpPlug.invoke(EmcpPlug.java:360)
        at oracle.sysman.emCfg.core.PerformMicroStep.runJavaClass(PerformMicroStep.java:540)
        at oracle.sysman.emCfg.core.PerformMicroStep.executeMicroStep(PerformMicroStep.java:120)
        at oracle.sysman.emCfg.core.ActionPerformer.performMicroStep(ActionPerformer.java:917)
        at oracle.sysman.emCfg.core.ActionPerformer$Performer.run(ActionPerformer.java:1038)

INFO: oracle.sysman.top.oms:The plug-in Repository Upgrade has failed its perform method
INFO: Cfm.save() was called
INFO: Cfm.save(): 2 aggregate instances saved
INFO: done waiting for Action from 17:10:12.688

これもBUG 7483221に関連するみたい。今度、SYSのパスワードを元に戻せばOK。
OMR(SYS)>  ALTER USER sys IDENTIFIED BY oracle;

User altered.

OMR(SYS)>

再度、コンフィグレーションを実行して、問題なくコンフィグレーションが終わった。
3.5 インストール後の確認

OMSの稼働状況

[work oracle(OMR)] /u01/app/oracle/oem_home/oms10g/opmn/bin/opmnctl status

Processes in Instance: EnterpriseManager0.db-node02
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status  
-------------------+--------------------+---------+---------
DSA                | DSA                |     N/A | Down    
HTTP_Server        | HTTP_Server        |   17043 | Alive   
LogLoader          | logloaderd         |     N/A | Down    
dcm-daemon         | dcm-daemon         |     N/A | Down    
OC4J               | home               |   17044 | Alive   
OC4J               | OC4J_EM            |   17045 | Alive   
OC4J               | OC4J_EMPROV        |   17052 | Alive   
WebCache           | WebCache           |   17055 | Alive   
WebCache           | WebCacheAdmin      |   17053 | Alive   

[work oracle(OMR)]

OMAの稼動状況
[work oracle(OMR)] /u01/app/oracle/oem_home/agent10g/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/oem_home/agent10g
Agent binaries    : /u01/app/oracle/oem_home/agent10g
Agent Process ID  : 31520
Parent Process ID : 31503
Agent URL         : https://db-node02:3872/emd/main/
Repository URL    : https://db-node02:1159/em/upload
Started at        : 2009-11-12 16:58:25
Started by user   : oracle
Last Reload       : 2009-11-12 18:30:14
Last successful upload                       : 2009-11-12 18:33:37
Total Megabytes of XML files uploaded so far :    26.37
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    78.76%
Last successful heartbeat to OMS             : 2009-11-12 18:35:41
---------------------------------------------------------------
Agent is Running and Ready
[work oracle(OMR)]

Web Browserで確認
Grid Control 10.2.0.5においてデフォルトでHTTPSアクセスになってHTTPアクセスが制限される。HTTPでアクセスする場合、下記のコマンドを実行する必要がある。
emctl secure unlock -console
oem_top.JPG
3.6 EM Grid Control トップページでリスナーのステータスがダウンの場合

実際にリスナーが立ち上っているのに、EMでダウンしているっと表示されたら、下記の対応手法を参考して下さい。
リスナーターゲット解析失敗(TNS-12545)

4.0 参考資料

Guide: Installing Oracle Enterprise Manager 10g Grid Control Rel 5 on Oracle Database 11g and Linux
Oracle® Enterprise Manager Grid Control Installation and Configuration Guide 10g Release 5 (10.2.0.5.0)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License