- TOP
- BLOG
- 技術ブログ
- Oracle VMテンプレートを使用してOracle Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3)をインストール
技術ブログ
すでにご存じかと思いますが、Oracle Database 12c では、Oracle Enterprise Manager Database Controlが廃止されています。代替ツールとしてOracle Enterprise Manager Express が提供されていますが、機能はかなり限定されています。このため、今後、Oracle Databaseの管理という観点では、Oracle Enterprise Manager Cloud Controlの重要性が増すことが予想されます。
と考えていたところ、Oracle Enterprise Manager Cloud Controlの新バージョン Oracle Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3) がリリースされ、さらに、Oracle VMのテンプレートがリリースされたとのことで、さっそく導入してみました。
弊社検証環境ではOracle VMを Xen-likeに使用しているので、vm.cfgを用意してxm createでVMを起動してやります。すると、OSのシステムサービスとして構成済みであるテンプレートウィザード(/etc/rc.d/init.d/oraclevm-template)が起動します。ウィザードに従い、IPアドレスなど基本的な設定を入力すると、自動的にリポジトリDBを含めたOEM環境が構成され、簡単に環境を構築できます。以下はテンプレートウィザードのメイン処理部分のログです。
[root@lc103cc1 log]# cat /var/log/emgc_clone.log =================Oracle DB clone log at Tue Aug 6 06:16:55 EDT 2013================: Setting up the DB, OMS and Agent on the same Guest. Do you want to enable dynamic IP configuration (DHCP) (Y|n)?Configuring network setting . A static IP address is recommended. Enter IP address:[] <== 入力 Enter netmask address:[] <== 入力 Enter hostname(e.g, host.domain.com):[localhost.localdomain] <== 入力 Enter default gateway IP address:[] <== 入力 Enter DNS server IP address:[] <== 入力 Restarting networking... Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] ================================================ Start cloning Oracle Database 11.2.0.3.0 ================================================ Running /u01/OracleHomes/db11g/product/11.2.0/dbhome_1/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/OracleHomes/db11g/product/11.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. Starting listener... LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-AUG-2013 07:07:02 Copyright (c) 1991, 2011, Oracle. All rights reserved. Starting /u01/OracleHomes/db11g/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.3.0 - Production System parameter file is /u01/OracleHomes/db11g/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /u01/OracleHomes/db11g/diag/tnslsnr/lc103cc1/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lc103cc1.domain)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 06-AUG-2013 07:07:03 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/OracleHomes/db11g/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/OracleHomes/db11g/diag/tnslsnr/lc103cc1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lc103cc1.domain)(PORT=1521))) The listener supports no services The command completed successfully Starting database ..... SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 6 07:07:03 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to an idle instance. SQL> ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2235208 bytes Variable Size 415237304 bytes Database Buffers 645922816 bytes Redo Buffers 5541888 bytes Database mounted. Database opened. SQL> System altered. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options =================================================================================== Oracle Database 11.2.0.3.0 started successfully at Tue Aug 6 07:07:11 EDT 2013 Database infomation: ORACLE_BASE = /u01/OracleHomes ORACLE_HOME = /u01/OracleHomes/db11g/product/11.2.0/dbhome_1 ORACLE_SID = emrepus =================================================================================== Running/allroot.sh Starting to execute allroot.sh ......... Starting to execute /u01/OracleHomes/Middleware/oms/root.sh ...... Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/OracleHomes/Middleware/oms Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. /etc exist Creating /etc/oragchomelist file... /u01/OracleHomes/Middleware/oms Finished execution of /u01/OracleHomes/Middleware/oms/root.sh ...... Starting to execute /u01/OracleHomes/agent/core/12.1.0.3.0/root.sh ...... Finished product-specific root actions. /etc exist Finished execution of /u01/OracleHomes/agent/core/12.1.0.3.0/root.sh ...... Starting Enterprise Manager Management Server ..... Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Starting Oracle Management Server... Starting WebTier... WebTier Successfully Started Oracle Management Server Successfully Started Oracle Management Server is Up Starting Enterprise Manager Management Agent ..... Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. Starting agent .................... started. Changing password for user root. passwd: all authentication tokens updated successfully. Changing password for user oracle. passwd: all authentication tokens updated successfully. Installation details of EM12cR3 (12.1.0.3.0) ..... EM url: https://lc103cc1.domain:7799/em Ports used by this deployment at /u01/OracleHomes/Middleware/oms/install/portlist.ini Database 11.2.0.3.0 location: /u01/OracleHomes/db11g Database name: emrepus EM Middleware Home location: /u01/OracleHomes/Middleware EM Agent Home location: /u01/Oraclehomes/agent/core/12.1.0.3.0 This information is also available in the file /home/oracle/README.FIRST To start all processes, as the user oracle, run the script /home/oracle/start_all.sh To stop all processes, as the user oracle, run the script /home/oracle/stop_all.sh
従来のバージョンでは Oracle Database や WLSの管理パスワードを入力したり、OCMに関する質問にこたえる必要が あったような気がしますが、12.1.0.3.0のテンプレートのデプロイではこれらの質問がありませんでした。手順がかなり簡略化されているようです。
OSユーザーのパスワードやそのほかのパスワードについては、VMテンプレートを 配布しているSoftware Delovery CloudのページにあるREADMEに記載されているので、 こちらを忘れずにチェックしましょう。
個人的にはoracleユーザーのUIDは500が好みで、可能な限りこの値に統一してあるのですが、 テンプレートでインストールするとUIDは54321になっていました。
[oracle@lc103cc1 ~]$ id uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh
使ってみた限りでは、OMSを配置したホストについて、emcc.example.com というホスト名で名前解決できないと、適切に機能しないように見えます。
例えば、OEMにターゲットを追加すると、以下のエラーが発生して追加できませんでした。
また、実は最初VMテンプレートをデプロイしたとき、emcc.example.comというホスト名の 名前解決に失敗したというエラーメッセージが表示され、Oracle Enterprise Managerを使用することができませんでした。このときは、インターネットにアクセスできない構成でインストールしていました。これが問題であり、インターネットにアクセスできれば、emcc.example.comというホストは使われることはないと思っていたのですは、そのようなことではないようです。
emcc.example.com というホスト名で名前解決できるようにするためと思われますが、OMSを配置したホストの/etc/hostsに emcc.example.com に関するエントリが追加されているようでした。(記憶が怪しいですが、手編集では追加していないはず・・・)
ターゲットの追加については、ターゲットとなるホストの/etc/hostsに emcc.example.com に関するエントリを追加することで対処できました。 同様のトラブルに出くわした方への参考になると幸いです。