运维联盟俱乐部

 找回密码
 立即注册
查看: 2585|回复: 0

[安装部署] 静默安装em_agent

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-9-25 07:49:53 | 显示全部楼层 |阅读模式
    很多时候,em要监控得主机和oms主机没有ssh,需要使用独立安装agent得方式,这种方式需要在server端和agent端得/etc/hostss上添加双方得主机名解析。

    1.在OMS主机上登录 EMCLI client:
    1. ./emctl login -username=$username -password=$password
    复制代码
    2.同步EMCLI:
    1. ./emctl sync
    复制代码
    3.查看OMS可用的Agent软件:
    1. ./emcli get_supported_platforms
    复制代码
    4.下载需要的Agent软件:

    export unzip_loc=/usr/bin/unzip

    1. ./emcli get_agentimage -destination=/tmp/emagent -platform="Oracle Solaris on SPARC (64-bit)" -version=12.1.0.3.0
    复制代码

    5.在目标机器上使用unzip工具解压Agent安装介质

    6.根据系统配置要求,编辑agent.rsp配置文件
    1. OMS_HOST=
    2. EM_UPLOAD_PORT=
    3. AGENT_REGISTRATION_PASSWORD=
    4. #AGENT_INSTANCE_HOME=<Value Unspecified>
    5. #AGENT_PORT=<Value Unspecified>
    6. b_startAgent=true
    7. #ORACLE_HOSTNAME=<Value Unspecified>
    8. #s_agentHomeName=<Value Unspecified>
    9. EM_INSTALL_TYPE="AGENT"
    复制代码

    7.根据agent.rsp配置文件,使用脚本安装Agent
    1. [oracle@wddb1 /tmp/emagent]$ ./agentDeploy.sh AGENT_BASE_DIR=/oracle/app/oracle/emagent RESPONSE_FILE=/tmp/emagent/agent.rsp -ignorePrereqs [-forceConfigure]
    复制代码

    8.使用root用户或sudo执行root.sh脚本
    1. /oracle/app/oracle/emagent/core/12.1.0.3.0/root.sh
    复制代码

    9.安装后检查Agent安装状态
    1. ./emctl status agent
    复制代码

    10.配置agent secure
    1. ./emctl stop agent
    2. ./emctl secure agent
    复制代码

    11.确定Agent是否可正常上传信息
    1. ./emctl upload
    复制代码

    12.查看日志确定插件是否安装成功,日志目录如下
    1. [oracle@wddb1 /tmp/emagent][        DISCUZ_CODE_43        ]nbsp; ./agentDeploy.sh AGENT_BASE_DIR=/oracle/app/oracle/emagent RESPONSE_FILE=/tmp/emagent/agent.rsp -ignorePrereqs -forceConfigure

    2. -e Validating the OMS_HOST & EM_UPLOAD_PORT
    3. Executing command : /oracle/app/oracle/emagent/core/12.1.0.3.0/jdk/bin/java -classpath /oracle/app/oracle/emagent/core/12.1.0.3.0/jlib/agentInstaller.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /oracle/app/oracle/emagent/core/12.1.0.3.0 /tmp/emagent /oracle/app/oracle/emagent -prereq

    4. Validating oms host & port with url: http://em12c:4903/empbs/genwallet
    5. Validating oms host & port with url: https://em12c:4903/empbs/genwallet
    6. Return status:1-oms port passed is not valid
    7. WARN: Forcing the configuration of the agent when the OMS is not available will configure the agent to use HTTP (non-secure) communication.  In order to properly establish secure HTTPS communication between the agent and the OMS, you will need to secure the agent after the OMS is available.
    8. Unzipping the agentcoreimage.zip to /oracle/app/oracle/emagent ....
    9. 12.1.0.3.0_PluginsOneoffs_212.zip
    10. Executing command : /tmp/emagent/unzip -o /tmp/emagent/12.1.0.3.0_PluginsOneoffs_212.zip -d /oracle/app/oracle/emagent
    11. Executing command : /oracle/app/oracle/emagent/core/12.1.0.3.0/jdk/bin/java  -d64 -classpath /oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/OraInstaller.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/xmlparserv2.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/srvm.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/emCfg.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/jlib/agentInstaller.jar:/oracle/app/oracle/emagent/core/12.1.0.3.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /oracle/app/oracle/emagent/core/12.1.0.3.0 /tmp/emagent /oracle/app/oracle/emagent /oracle/app/oracle/emagent/agent_inst AGENT_BASE_DIR=/oracle/app/oracle/emagent


    12. Cloning the agent home...
    13. Executing command: /oracle/app/oracle/emagent/core/12.1.0.3.0/oui/bin/runInstaller -debug   -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/oracle/app/oracle/emagent/core/12.1.0.3.0 -responseFile /tmp/emagent/agent.rsp  AGENT_BASE_DIR=/oracle/app/oracle/emagent AGENT_BASE_DIR=/oracle/app/oracle/emagent RESPONSE_FILE=/tmp/emagent/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12c1 -force b_forceConfigure=true b_noUpgrade=true AGENT_PORT=-1
    14. Clone Action Logs Location:/oracle/app/oraInventory/logs/cloneActions<timestamp>.log
    15. Cloning of agent home completed successfully

    16. Attaching sbin home...
    17. Executing command: /oracle/app/oracle/emagent/core/12.1.0.3.0/oui/bin/runInstaller -debug   -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=/oracle/app/oracle/emagent/sbin ORACLE_HOME_NAME=sbin12c1 -force
    18. Attach Home Logs Location:/oracle/app/oracle/emagent/core/12.1.0.3.0/cfgtoollogs/agentDeploy/AttachHome<timestamp>.log
    19. Attach home for sbin home completed successfully.

    20. Updating home dependencies...
    21. Executing command: /oracle/app/oracle/emagent/core/12.1.0.3.0/oui/bin/runInstaller -debug   -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/oracle/app/oracle/emagent/sbin:/oracle/app/oracle/emagent/core/12.1.0.3.0} -invPtrLoc /oracle/app/oracle/emagent/core/12.1.0.3.0/oraInst.loc -force
    22. Update Home Dependencies Location:/oracle/app/oracle/emagent/core/12.1.0.3.0/cfgtoollogs/agentDeploy/UpdateHomeDeps<timestamp>.log
    23. Update home dependency completed successfully.

    24. Performing the agent configuration...
    25. Executing command: /oracle/app/oracle/emagent/core/12.1.0.3.0/oui/bin/runConfig.sh ORACLE_HOME=/oracle/app/oracle/emagent/core/12.1.0.3.0 RESPONSE_FILE=/oracle/app/oracle/emagent/core/12.1.0.3.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true
    26. Configuration Log Location:/oracle/app/oracle/emagent/core/12.1.0.3.0/cfgtoollogs/cfgfw/CfmLogger<timestamp>.log
    27. Agent Configuration completed successfully

    28. The following configuration scripts need to be executed as the "root" user.
    29. #!/bin/sh
    30. #Root script to run
    31. /oracle/app/oracle/emagent/core/12.1.0.3.0/root.sh
    32. To execute the configuration scripts:
    33. 1. Open a terminal window
    34. 2. Log in as "root"
    35. 3. Run the scripts
    36. Agent Deployment Successful.
    37. Agent deployment log location:
    38. /oracle/app/oracle/emagent/core/12.1.0.3.0/cfgtoollogs/agentDeploy/agentDeploy_2020-10-27_11-23-48-AM.log
    39. Agent deployment completed successfully.
    40. You have mail in /usr/spool/mail/oracle
    复制代码


    回复

    使用道具 举报

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

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 14:08 , Processed in 0.054467 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

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