HOW TO INSTALL OEM AGENT IN TARGET DATABASE SERVER MANUALLY FOR 13C4

Login to REPOSITORY server and locate to middleware home bin folder

[oracle@oem ~]$ /data01/app/em/middleware/bin/emcli x
Enter password
Login successful

Check for supported platform as per current OEM version. My version is 13cR4

[oracle@oem ~]$ /data01/app/em/middleware/bin/emcli get_supported_platforms
-----------------------------------------------
Version = 13.4.0.0.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

Download the image to particular directory. Here destination parameter takes the location of the software to be downloaded. Platform should be your OS platform and either 32 or 64 bit

[oracle@oem agent_13.4.0.0.0]$ /data01/app/em/middleware/bin/emcli get_agentimage -destination=/home/oracle/agent -platform="Linux x86-64" -version="13.4.0.0.0"
 === Partition Detail ===
Space free : 30 GB
Space required : 1 GB
Check the logs at /data01/app/em/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2021-11-25_21-57-45-PM.log
Downloading /home/oracle/agent/13.4.0.0.0_AgentCore_226.zip
File saved as /home/oracle/agent/13.4.0.0.0_AgentCore_226.zip
Downloading /home/oracle/agent/13.4.0.0.0_Plugins_226.zip
File saved as /home/oracle/agent/13.4.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.4.0.0.0_Plugins_226.zip -d /home/oracle/agent
Exit status is:0
Agent Image Download completed successfully.

Copy the image zip file to the target database (database for which agent is to be installed)

[oracle@oem agent]$ scp 13.4.0.0.0_AgentCore_226.zip oracle@192.168.56.222:/home/oracle/

Create a directory for the agent software files to be installed

-bash-4.2$ mkdir -p /u01/app/oracle/agent

unzip zip file to the staging directory

-bash-4.2$ unzip 13.4.0.0.0_AgentCore_226.zip -d /u01/app/oracle/agent
Archive:  13.4.0.0.0_AgentCore_226.zip
  inflating: /u01/app/oracle/agent/agentcore.bin
  inflating: /u01/app/oracle/agent/agent.rsp
  inflating: /u01/app/oracle/agent/agentDeploy.sh
  inflating: /u01/app/oracle/agent/agentimage.properties
  inflating: /u01/app/oracle/agent/unzip
  inflating: /u01/app/oracle/agent/zip
   creating: /u01/app/oracle/agent/plugins/
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.emas.discovery.plugin-13.4.1.0.0.farb
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.si.discovery.plugin-13.4.1.0.0.farb
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.db.discovery.plugin-13.4.1.0.0.farb
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.xa.discovery.plugin-13.4.1.0.0.farb
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.oh.discovery.plugin-13.4.0.0.0.farb
  inflating: /u01/app/oracle/agent/plugins/oracle.sysman.oh.agent.plugin-13.4.0.0.0.farb
  inflating: /u01/app/oracle/agent/plugins.txt

Deploy the agent in the target database and wait for deplyment to complete. Enter the correct values for all the parameters as per your configuration

./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/agent -force -ignorePrereqs -invPtrLoc /etc/oraInst.loc AGENT_PORT=3872 EM_UPLOAD_PORT=4903 OMS_HOST=192.168.56.23 ORACLE_HOSTNAME=192.168.56.32 AGENT_INSTANCE_HOME=/u01/app/oracle/agent/agent_inst AGENT_REGISTRATION_PASSWORD=password SCRATCHPATH=/tmp

Secure the agent manually, if the automatic deployment fails.

[oracle@dcoem13c ~]$ /u02/app/oracle/mw/em13c5/bin/emctl secure setpwd Oracle_123 Oracle_123
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
Registration Password already exists.

Start the agent in target database

-bash-4.2$ /u01/app/oracle/agent/agent_inst/bin/emctl start agent
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
Starting agent ................... started.

Configure the agent with “addinternaltargets” option if the agent deployment fail with the message in the second box starting with “Promoting agent…..”

-bash-4.2$ /u01/app/oracle/agent/agent_inst/bin/emctl config agent addinternaltargets
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
Promoting agent and its related targets to Management Service failed probably due to target type meta version present on the agent is not present on the OMS.Make sure that the plug-in version deployed on agents is the same as that of the version on the OMS. Also, the agent should be on the same bundle patch version as that of the OMS.For more details, check <AGENT_INST>/sysman/log/gcagent.log on agent and emoms_pbs.log on the OMS.
Fix the cause of the error and retry the operation (or) manually run the following commands on the remote host
/u01/app/oracle/agent/agent_inst/bin/emctl start agent
/u01/app/oracle/agent/agent_inst/bin/emctl config agent addinternaltargets

Run root.sh script

[root@orcl19x agent]# /u01/app/oracle/agent/agent_13.4.0.0.0/root.sh
Finished product-specific root actions.
/etc exist
Creating /etc/oragchomelist file...

Check the status of the agent

-bash-4.2$ /u01/app/oracle/agent/agent_13.4.0.0.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 13.4.0.0.0
OMS Version            : (unknown)
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/agent/agent_inst
Agent Log Directory    : /u01/app/oracle/agent/agent_inst/sysman/log
Agent Binaries         : /u01/app/oracle/agent/agent_13.4.0.0.0
Core JAR Location      : /u01/app/oracle/agent/agent_13.4.0.0.0/jlib
Agent Process ID       : 26363
Parent Process ID      : 26326
Agent URL              : http://192.168.56.197:3872/emd/main/
Local Agent URL in NAT : http://192.168.56.197:3872/emd/main/
Repository URL         : https://192.168.56.183:4903/empbs/upload/
Started at             : 2021-11-26 14:12:31
Started by user        : oracle
Operating System       : Linux version 4.1.12-61.1.18.el7uek.x86_64 (amd64)
Number of Targets      : (none)
Last Reload            : (none)
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far : 0
Number of XML files pending upload           : 2
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 78.06%
Collection Status                            : Collections enabled
Heartbeat Status                             : OMS is unreachable
Last attempted heartbeat to OMS              : 2021-11-26 14:38:06
Last successful heartbeat to OMS             : (none)
Next scheduled heartbeat to OMS              : 2021-11-26 14:38:36
---------------------------------------------------------------
Agent is Running and Ready

Leave a Reply