###背景##
OEM监控oracle DB 单机安装agent
###版本号
OEM监控主机:Version = 13.5.0.0.0 Platform = Linux x86-64 A
目标DB主机:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.14.0.0.0 B
要在 OEM平台监控DB主机 ,A 代表监控主机OEM B代表要被监控的数据库目标主机
1.添加主机解析
在A 主机中添加B主机ip 主机名 域名
[root@A ~]# vi /etc/hosts
### safabdw & sahdin08
xx,xx.xx.xx B B.eavarytech.com
在B 主机中添加 A主机ip 主机名 域名
[root@B ~]# vi /etc/hosts
xx,xx.xx.xx A A.eavarytech.com
2.在OEM主机A 中生成安装包,传送至B主机安装
2.1 查看OEM监控A主机 安装 bin目录
[oracle@A bin]$ ps -ef|grep wls
执行登陆
[oracle@A bin]$cd /u01/app/oem13.5/mw/bin
[oracle@A bin]$ ./emcli login -username=sysman(OEMweb账号) -password=oracle123(密码)
Login successful
You have mail in /var/spool/mail/oracle
[oracle@A bin]$ ./emcli sync
Synchronized successfully
[oracle@A bin]$ ./emcli get_supported_platforms
-----------------------------------------------
Version = 13.5.0.0.0
Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.
2.2 开始生成agent安装包
[oracle@A bin]$ ./emcli get_agentimage -destination=/home/oracle/agent -platform="Linux x86-64" -version=13.5.0.0.0
=== Partition Detail ===
Space free : 32 GB
Space required : 1 GB
Check the logs at /u01/app/oem13.5/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2024-10-11_17-02-04-PM.log
Downloading /home/oracle/agent/13.5.0.0.0_AgentCore_226.zip
File saved as /home/oracle/agent/13.5.0.0.0_AgentCore_226.zip
Downloading /home/oracle/agent/13.5.0.0.0_Plugins_226.zip
File saved as /home/oracle/agent/13.5.0.0.0_Plugins_226.zip
Downloading /home/oracle/agent/unzip
File saved as /home/oracle/agent/unzip
Executing command: /home/oracle/agent/unzip /home/oracle/agent/13.5.0.0.0_Plugins_226.zip -d /home/oracle/agent
Archieving agentImage and plugins.
Exit status is:0
Agent Image Download completed successfully
2.3 传输至目标主机并进行安装
[oracle@A bin]$ scp -p 13.5.0.0.0_AgentCore_226.zip B:/home/oracle
[oracle@B bin]$ mkdir -p /home/oracle/emagent135 --创建agent安装目录
[oracle@B bin]$./agentDeploy.sh AGENT_BASE_DIR=/home/oracle/emagent135 OMS_HOST= A域名/IP EM_UPLOAD_PORT=4889 AGENT_PORT=3872 AGENT_REGISTRATION_PASSWORD=oracle123(OEM主机SYSMAN密码) ORACLE_HOSTNAME=B域名/IP
-- 使用主机名添加需要增加参数-ignorePrereqs
[oracle@B bin]$./agentDeploy.sh AGENT_BASE_DIR=/home/oracle/emagent135 OMS_HOST= A主机名 EM_UPLOAD_PORT=4889 AGENT_PORT=3872 AGENT_REGISTRATION_PASSWORD=oracle123(OEM主机SYSMAN密码) ORACLE_HOSTNAME=B主机名
.....省略
.shared agent value is :false
chain install is :false
Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user. Root script to run : /home/oracle/emagent135/agent_13.5.0.0.0/root.sh
/home/oracle/emagent135/agent_13.5.0.0.0/cfgtoollogs/agentDeploy/agentDeploy_2024-10-11_17-22-54-PM.log
Waiting for agent targets to get promoted...
Successfully Promoted agent and its related targets to Management Agent
目标主机B 安装成功,查看agent状态
[oracle@B bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.5.0.0.0
OMS Version : 13.5.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /home/oracle/emagent135/agent_inst
Agent Log Directory : /home/oracle/emagent135/agent_inst/sysman/log
Agent Binaries : /home/oracle/emagent135/agent_13.5.0.0.0
Core JAR Location : /home/oracle/emagent135/agent_13.5.0.0.0/jlib
Agent Process ID : 62042
Parent Process ID : 61823
Agent URL : https://B:3872/emd/main/
Local Agent URL in NAT : https://B:3872/emd/main/
Repository URL : https://A:4903/empbs/upload
Started at : 2024-10-12 08:09:52
Started by user : oracle
Operating System : Linux version 5.4.17-2102.201.3.el7uek.x86_64 (amd64)
Number of Targets : 8
Last Reload : (none)
Last successful upload : 2024-10-12 15:41:02
Last attempted upload : 2024-10-12 15:41:02
Total Megabytes of XML files uploaded so far : 1.52
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 74.38%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2024-10-12 15:41:24
Last successful heartbeat to OMS : 2024-10-12 15:41:24
Next scheduled heartbeat to OMS : 2024-10-12 15:42:24
---------------------------------------------------------------
B主机执行root 执行: sh /home/oracle/agent/agent_13.5.0.0.0/root.sh
其他命令: ./emcli stop/start agent
3.添加WEB界面单机DB主机
打开OEM主机页面 手动添加数据库
设置-添加目标-手动添加目标
使用引导式程序新增
单实例添加
选择主机
下一步
配置dbsnmp 用户测试,然后下一步直到完成
测试连接
下一步
点击保存
关闭-点击目标-数据库
找到自己添加的数据库就可以查看啦!!!
配置安装完成!!
#############end######################