分类: Oracle
2015-02-09 12:14:24
使用如下命令启动OMS和Agent 服务:
/u01/app/oracle/oms12cr4/oms/bin/emctl start oms
/u01/app/oracle/agent12cr4/core/12.1.0.4.0/bin/emctl start agent
使用如下命令停止OMS和Agent 服务:
/u01/app/oracle/oms12cr4/oms/bin/emctl stop oms -all
/u01/app/oracle/agent12cr4/core/12.1.0.4.0/bin/emctl stop agent
一 OEM 12cR4使用agentDeploy方式安装agent(target db 的agent 安装) 参考 http://blog.csdn.net/staricqxyz/article/details/19500213
--在OMS服务器使用SYSMAN登录emcli,同步emcli
[oracle@prod Desktop]$ /u01/app/oracle/oms12cr4/oms/bin/emcli login -username=sysman -password=sysman11
Login successful
[oracle@prod Desktop]$ /u01/app/oracle/oms12cr4/oms/bin/emcli sync
Synchronized successfully
[oracle@prod Desktop]$
--列出agent版本
[oracle@prod Desktop]$ /u01/app/oracle/oms12cr4/oms/bin/emcli get_supported_platforms
-----------------------------------------------
Version = 12.1.0.4.0
Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.
[oracle@prod Desktop]$
--获取agent,并且传送到agent服务器
[oracle@prod ~]$ /u01/app/oracle/oms12cr4/oms/bin/emcli get_agentimage -destination=/home/oracle/agent_temp -platform="Linux x86-64" -version=12.1.0.4.0
=== Partition Detail ===
Space free : 4 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2015-02-16_00-42-22-AM.log
Downloading /home/oracle/agent_temp/12.1.0.4.0_AgentCore_226.zip
File saved as /home/oracle/agent_temp/12.1.0.4.0_AgentCore_226.zip
Downloading /home/oracle/agent_temp/12.1.0.4.0_PluginsOneoffs_226.zip
File saved as /home/oracle/agent_temp/12.1.0.4.0_PluginsOneoffs_226.zip
Downloading /home/oracle/agent_temp/unzip
File saved as /home/oracle/agent_temp/unzip
Agent Image Download completed successfully.
[oracle@prod ~]$
[oracle@prod agent_temp]$ scp 12.1.0.4.0_AgentCore_226.zip
The authenticity of host '192.168.239.100 (192.168.239.100)' can't be established.
RSA key fingerprint is 0c:87:73:f7:3e:32:2a:e2:5e:75:1c:1e:00:89:32:d7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.239.100' (RSA) to the list of known hosts.
password:
12.1.0.4.0_AgentCore_226.zip 100% 244MB 15.2MB/s 00:16
[oracle@prod agent_temp]$
--agent端解压
[oracle@prod oms_agent]$ unzip 12.1.0.4.0_AgentCore_226.zip
Archive: 12.1.0.4.0_AgentCore_226.zip
inflating: unzip
inflating: agentDeploy.sh
inflating: agentimage.properties
inflating: agent.rsp
extracting: agentcoreimage.zip
extracting: 12.1.0.4.0_PluginsOneoffs_226.zip
[oracle@prod oms_agent]$
--安装agent
[oracle@prod oms_agent]$ mkdir -p /u01/app/oracle/oma
[oracle@db10g oma]$ ./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/oma OMS_HOST=prod.test.com EM_UPLOAD_PORT=4889 AGENT_REGISTRATION_PASSWORD=oracle ORACLE_HOSTNAME=prod.ibm.com
EM_UPLOAD_PORT=4889 *** 注意这个端口号 , 我是根据如下官方的建议 去prod.test.com ,netstat -na 查看得到的
AGENT_REGISTRATION_PASSWORD=sysman11 这个密码是在安装oms server 的时候填的 registration password
Port Requirements
?Admin Server HTTP SSL Port = 7101 – 7200
?Enterprise Manager Upload HTTP Port = 4889 – 4898
?Enterprise Manager Upload HTTP SSL Port = 1159, 4899 – 4908
?Enterprise Manager Central Console HTTP Port = 7788 – 7798
?Enterprise Manager Central Console HTTP SSL Port = 7799 – 7809
?Oracle Management Agent Port = 3872, 1830 – 1849
[oracle@prod oms_agent]$ ./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/oma OMS_HOST=prod.test.com EM_UPLOAD_PORT=4889 AGENT_REGISTRATION_PASSWORD=sysman11 ORACLE_HOSTNAME=prod.ibm.com
Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/app/oracle/oma/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/oma/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/oma/core/12.1.0.4.0 /home/oracle/oms_agent /u01/app/oracle/oma -prereq
Validating oms host & port with url:
Validating oms host & port with url:
Return status:0-oms http port is passed
Unzipping the agentcoreimage.zip to /u01/app/oracle/oma ....
12.1.0.4.0_PluginsOneoffs_226.zip
Executing command : /home/oracle/oms_agent/unzip -o /home/oracle/oms_agent/12.1.0.4.0_PluginsOneoffs_226.zip -d /u01/app/oracle/oma
Executing command : /u01/app/oracle/oma/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/OraInstaller.jar:/u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/xmlparserv2.jar:/u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/srvm.jar:/u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/emCfg.jar:/u01/app/oracle/oma/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/oma/core/12.1.0.4.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/oma/core/12.1.0.4.0 /home/oracle/oms_agent /u01/app/oracle/oma /u01/app/oracle/oma/agent_inst AGENT_BASE_DIR=/u01/app/oracle/oma
Executing agent install prereqs...
Executing command: /u01/app/oracle/oma/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion -prereqlogloc /u01/app/oracle/oma/core/12.1.0.4.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/u01/app/oracle/oma/core/12.1.0.4.0/prereqs -J-DORACLE_HOSTNAME=prod.ibm.com -J-DAGENT_BASE_DIR=/u01/app/oracle/oma
Agent install prereqs completed successfully
Cloning the agent home...
Executing command: /u01/app/oracle/oma/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/oma/core/12.1.0.4.0 AGENT_BASE_DIR=/u01/app/oracle/oma AGENT_BASE_DIR=/u01/app/oracle/oma OMS_HOST=prod.test.com EM_UPLOAD_PORT=4889 AGENT_REGISTRATION_PASSWORD=sysman11 ORACLE_HOSTNAME=prod.ibm.com -noconfig ORACLE_HOME_NAME=agent12c2 -force b_noUpgrade=true AGENT_PORT=-1
Cloning of agent home completed successfully
Attaching sbin home...
Executing command: /u01/app/oracle/oma/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/oma/sbin ORACLE_HOME_NAME=sbin12c2 -force
Attach home for sbin home completed successfully.
Updating home dependencies...
Executing command: /u01/app/oracle/oma/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/u01/app/oracle/oma/sbin:/u01/app/oracle/oma/core/12.1.0.4.0} -invPtrLoc /u01/app/oracle/oma/core/12.1.0.4.0/oraInst.loc -force
Update home dependency completed successfully.
Executing command: /u01/app/oracle/oma/core/12.1.0.4.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/oma/core/12.1.0.4.0 RESPONSE_FILE=/u01/app/oracle/oma/core/12.1.0.4.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true
Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u01/app/oracle/oma/core/12.1.0.4.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
Agent Deployment Successful.
Agent deployment log location: /u01/app/oracle/oma/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-02-16_21-17-55-PM.log
Agent deployment completed successfully.
[oracle@prod oms_agent]$
[root@prod ~]# /u01/app/oracle/oma/core/12.1.0.4.0/root.sh
Finished product-specific root actions.
/etc exist
Creating /etc/oragchomelist file...
[root@prod ~]#
--target 端查看agent状态
[oracle@prod oms_agent]$ /u01/app/oracle/oma/core/12.1.0.4.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 12.1.0.4.0
OMS Version : 12.1.0.4.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/oma/agent_inst
Agent Log Directory : /u01/app/oracle/oma/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/oma/core/12.1.0.4.0
Agent Process ID : 8673
Parent Process ID : 8630
Agent URL :
Local Agent URL in NAT :
Repository URL :
Started at : 2015-02-16 21:19:39
Started by user : oracle
Operating System : Linux version 2.6.18-194.el5 (amd64)
Last Reload : (none)
Last successful upload : 2015-02-16 21:31:02
Last attempted upload : 2015-02-16 21:31:02
Total Megabytes of XML files uploaded so far : 0.25
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 39.96%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2015-02-16 21:33:46
Last successful heartbeat to OMS : 2015-02-16 21:33:46
Next scheduled heartbeat to OMS : 2015-02-16 21:34:46
---------------------------------------------------------------
Agent is Running and Ready
[oracle@prod oms_agent]$
二 , 当target 端 agent 安装配置启动完成后,就可以在 oms 端通过 admin console 添加被监控数据库 ( )
参考 http://blog.csdn.net/staricqxyz/article/details/19499103
左上角Target(目标) -> Database(数据库) Search List(搜索列表) -> add(添加) 点击 Next(继续)
OMS默认采用dbsnmp 用户监控 target db ,
alter user dbsnmp account unlock identified by dbsnmp;