重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3426|回复: 1
打印 上一主题 下一主题

[原创] em12c 12.1.0.5部署 windows客户端

[复制链接]
跳转到指定楼层
楼主
发表于 2016-7-14 09:24:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

oms安装在 linux,
被管理机器在windows。 agent需要安装在 windows

1.获取agent

OMS服务器使用SYSMAN登录emcli,同步emcli

[oracle@omsdb agent]$$OMS_HOME/bin/emcli login -username=sysman -password=oracle

Login successful


[oracle@omsdb agent]$$OMS_HOME/bin/emcli sync

Synchronized successfully


2.列出agent版本

[oracle@omsdb agent]$$OMS_HOME/bin/emcli get_supported_platforms

-----------------------------------------------
Version = 12.1.0.5.0
Platform = Linux x86-64
-----------------------------------------------
-----------------------------------------------
Version = 12.1.0.5.0
  Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------
-----------------------------------------------
Version = 12.1.0.5.0
  Platform = Microsoft Windows x64 (32-bit)
-----------------------------------------------

Platforms list displayed successfully.


3.获取agent,并且传送到agent服务器

[oracle@omsdb agent]$ emcli get_agentimage -destination=/home/em12c/12.5 -platform="Microsoft Windows x64 (64-bit)" -version=12.1.0.5.0



上面的平台和版本以 get_supported_platforms 为准


=== Partition Detail ===
Space free : 77 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/product/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2014-02-19_19-54-56-PM.log
Downloading /home/oracle/agent/12.1.0.5.0_AgentCore_223.zip
File saved as /home/oracle/agent/12.1.0.5.0_AgentCore_223.zip
Downloading /home/oracle/agent/12.1.0.5.0_PluginsOneoffs_223.zip
File saved as /home/oracle/agent/12.1.0.5.0_PluginsOneoffs_223.zip
Downloading /home/oracle/agent/unzip
File saved as /home/oracle/agent/unzip
Agent Image Download completed successfully.

注意 :这里一定要成功 产生 12.1.0.5.0_AgentCore_223.zip 文件,并且只有一个文件才对 ,
我的环境中遇到 zip路径不对 ,导致一直 失败 ,后来 使用
  按提示 ,设置 zip路径才对 。
export ZIP_LOC=/usr/bin/zip

4.安装 agent
  注意,一定是从oms服务器上去下载的agent安装包,不是直接从metalink上下载的安装包,直接下载的安装包,不包含插件,安装会报错。  
解压12.1.0.5.0_AgentCore_233.zip文件。
在oms端和agent的hosts文件中增加相应的主机名解析。
   注意,这里安装agent的机器一定要要有长文件名,否则,在安装的过程中,通不过前提条件的检查
   如下面这样:
   168.168.79.10 zhengquan-pc.com zhengquan-pc
   在agent.rsp文件中编辑下列参数
OMS_HOST=em12cserver.local.localdomain  这里是oms服务器的名字
EM_UPLOAD_PORT=4889 (这个检查oms服务器)
AGENT_REGISTRATION_PASSWORD=oracle11g (这个口令不是 sysman用户的口令,需要在 oms服务器上生成)
AGENT_INSTANCE_HOME=d:\em12c\agent  
b_startAgent=true
ORACLE_HOSTNAME=zhengquan-pc.com  这里是安装agent机器的名字
s_agentHomeName="agent12cR5" 这个名字随便取的
s_agentServiceName="agent12cR5" 这个名字随便取的
EM_INSTALL_TYPE="AGENT"        
使用管理员身份在cmd下进入archive目录,执行如下指令
d:> agentDeploy.bat AGENT_BASE_DIR=D:\em12c OMS_HOST=em12cserver.local.localdomain EM_UPLOAD_PORT=4889 AGENT_REGISTRATION_PASSWORD=oracle11g ORACLE_HOSTNAME=zhengquan-pc.com

    执行完成后在oms端即可自动发现agent端的主机。然后推送相应插件后即可完成对oracle,sqlserver,iis,netframework等的监控





  



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2016-7-17 16:25:36 | 只看该作者
AGENT_REGISTRATION_PASSWORD,这个密码不是SYSMAN的密码
           如果忘记了
           可以在服务器端执行emctl secure setpwd sysmanpassword agentregisterpasswd,重置这个密码
    具体可以为: secure setpwd oracle_4U oracle11g

这个口令一定要正确,否则,在部署agent时候,会报以下错误:
   emctl secure agent command has failed with status=1


信息: oracle.sysman.top.agent:Successfully created service Oracleagent12c1Agent

信息: oracle.sysman.top.agent:正在执行命令: cmd /c set NEED_EXIT_CODE=1&&D:\app\agent_inst\bin\emctl.bat secure agent
信息: oracle.sysman.top.agent:Oracle Enterprise Manager Cloud Control 12c Release 2  
信息: oracle.sysman.top.agent:Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
信息: oracle.sysman.top.agent:Agent is already stopped...   Done.
信息: oracle.sysman.top.agent:Securing agent...   Started.
信息: oracle.sysman.top.agent:Securing agent...   Failed.
信息: oracle.sysman.top.agent:The command: cmd /c set NEED_EXIT_CODE=1&&D:\app\agent_inst\bin\emctl.bat secure agent  completed with status=1
严重: oracle.sysman.top.agent:emctl secure agent command has failed with status=1
信息: oracle.sysman.top.agent:按照下面的步骤操作以手动保护并添加主机和代理目标:
1. 执行命令: cmd /c set NEED_EXIT_CODE=1&&D:\app\agent_inst\bin\emctl.bat secure agent  
2. 通过执行下面的命令启动代理: D:\app\agent_inst\bin\emctl start agent
3. 通过执行下面的命令添加目标: D:\app\agent_inst\bin\emctl config agent addinternaltargets
严重: oracle.sysman.top.agent:Agent configuration has failed
信息: oracle.sysman.top.agent:AgentConfiguration: 代理配置已完成, 状态为“假”
信息: oracle.sysman.top.agent:AgentConfiguration:agent configuration finished with status = false
信息: oracle.sysman.top.agent:The plug-in Agent Configuration Assistant has failed its perform method
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-20 03:08 , Processed in 0.138656 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表