How to Manually Deploy the OEM agent on Server EMCLI



Pre-Requisites:

The Registration password should be created or enabled.

Please refer below link on Registration_password.

https://www.funoracleapps.com/2021/05/how-to-setup-agentregistrationpassword.html

 

OEM agent Manual deployment steps:

 

The Enterprise Manager Command Line Interface (EM CLI) enables users to access Enterprise Manager functionality through a command-line interface or scripts. It is accessible through classic programming language constructs, enabling tasks to be created and run either from the command-line or programmatically. EM CLI enables you to access Enterprise Manager Cloud Control functionality from text-based consoles (shells and command-line windows). EM CLI provides two installable kits - EM CLI Standard and EM CLI with Scripting mode. Both can be installed on any system within your managed network.

We have to setup EMCLI first. The steps can also be seen from EM console.

 

From EM console

 

 




 

 







Brief About the Environment I am using

 

OMS Server: omsserver.lab

OS: OEL 6.3

 

Target Server for Agent: funoel8.lab

OS: OEL 8.3

 

 

On the OMS server omsserver

 

Oracle is the user from where OMS us running

 

su – oracle

Export JAVA_HOME

export JAVA_HOME=/u01/oracle/12.1.0/middleware/jdk16/jdk

 

Install emcli

oracle@omsserver: [/u01/oracle/12.1.0]

$ find ./ -name "emcli*.jar"

./middleware/oms/sysman/jlib/emcliadvancedkit.jar

Copy the emcliadvancedkit.jar to install_dir(/u01/oracle/12.1.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup)

 $JAVA_HOME/bin/java -jar emcliadvancedkit.jar  client -install_dir=/u01/oracle/12.1.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup

 

Configure EMCLI to OEM

 

[oracle@host emcli]$ ./emcli setup -url=https://omsserver.lab:7802/em -username=sysman –trustall

Sync EMCLI

oracle@omsserver: [/u01/oracle/12.1.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup]

$ ./emcli sync

Synchronized successfully

Check supported platforms and agent version

oracle@omsserver: [/u01/oracle/12.1.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup]

$ ./emcli get_supported_platforms

-----------------------------------------------

Version = 12.1.0.5.0

 Platform = Linux x86-64

-----------------------------------------------

Version = 12.1.0.1.0

 Platform = HP-UX Itanium

 

Download agent image in an empty directory

 

oracle@omsserver: [/u01/oracle/12.1.0/gc_inst/em/EMGC_OMS1/sysman/emcli/setup]

$ ./emcli get_agentimage -destination=/oracle/stage/HS/OEM_Agent12.1.0.5 -platform="Linux x86-64" -version=12.1.0.5.0

 === Partition Detail ===

Space free : 210 GB

Space required : 1 GB

Check the logs at /home/oracle/.emcli/get_agentimage_2021-05-07_10-28-41-AM.log

Downloading /oracle/stage/HS/OEM_Agent12.1.0.5/12.1.0.5.0_AgentCore_226.zip

File saved as /oracle/stage/HS/OEM_Agent12.1.0.5/12.1.0.5.0_AgentCore_226.zip

Downloading /oracle/stage/HS/OEM_Agent12.1.0.5/12.1.0.5.0_PluginsOneoffs_226.zip

File saved as /oracle/stage/HS/OEM_Agent12.1.0.5/12.1.0.5.0_PluginsOneoffs_226.zip

Downloading /oracle/stage/HS/OEM_Agent12.1.0.5/unzip

File saved as /oracle/stage/HS/OEM_Agent12.1.0.5/unzip

Agent Image Download completed successfully.

 

Copy the agent image to funoel8 server.

Make a directory structure

oraoem is the user from which my agent will run.

su – oraoem

mkdir –p /oem/oracle/agent12c/agent_inst   /oem/oracle/OEM_Agent12.1.0.5

Copy the agent image zip file to /oem/oracle/OEM_Agent12.1.0.5/ and unzip.

 

[oraoem@funoel8 OEM_Agent12.1.0.5]$ unzip 12.1.0.5.0_AgentCore_226.zip

Archive:  12.1.0.5.0_AgentCore_226.zip

  inflating: unzip

  inflating: agentDeploy.sh

  inflating: agentimage.properties

  inflating: agent.rsp

 extracting: agentcoreimage.zip

 extracting: 12.1.0.5.0_PluginsOneoffs_226.zip

 

Edit the agent.rsp  response file and add below entries.

 

OMS_HOST=omsserver.lab

EM_UPLOAD_PORT=4903

AGENT_REGISTRATION_PASSWORD=oraoem   --> This was already mentioned in Pre-Requisites

AGENT_INSTANCE_HOME=/oem/oracle/agent12c/agent_inst

AGENT_PORT=3872

b_startAgent=true

ORACLE_HOSTNAME=funoel8.lab

s_agentHomeName=agent12gR1

EM_INSTALL_TYPE="AGENT"

 

Make sure java and all pre-reqs are installed. As this is OEL 8 system I used below command to install pre-reqs related to Oracle.

 

yum install -y oracle-database-preinstall-19c

yum install java -y

 

Make sure the inventory directory is created and has correct permission.

 

cat /etc/oraInst.loc

inventory_loc=/etc/oraInventory

inst_group=dba

 

chmod oraoem:dba /etc/oraInventory

Install the OEM agent now

[oraoem@funoel8 OEM_Agent12.1.0.5]$ ./agentDeploy.sh AGENT_BASE_DIR=/oem/oracle/agent12c RESPONSE_FILE=/oem/oracle/OEM_Agent12.1.0.5/agent.rsp INVENTORY_LOCATION=/etc/oraInventory

 

Validating the OMS_HOST & EM_UPLOAD_PORT

Executing command : /oem/oracle/agent12c/core/12.1.0.5.0/jdk/bin/java -classpath /oem/oracle/agent12c/core/12.1.0.5.0/jlib/agentInstaller.jar:/oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /oem/oracle/agent12c/core/12.1.0.5.0 /oem/oracle/OEM_Agent12.1.0.5 /oem/oracle/agent12c AGENT_BASE_DIR=/oem/oracle/agent12c RESPONSE_FILE=/oem/oracle/OEM_Agent12.1.0.5/agent.rsp INVENTORY_LOCATION=/etc/oraInventory -prereq

 

Validating oms host & port with url: http://omsserver.lab:4903/empbs/genwallet

Validating oms host & port with url: https://omsserver.lab:4903/empbs/genwallet

Return status:3-oms https port is passed

Unzipping the agentcoreimage.zip to /oem/oracle/agent12c ....

12.1.0.5.0_PluginsOneoffs_226.zip

Executing command : /oem/oracle/OEM_Agent12.1.0.5/unzip -o /oem/oracle/OEM_Agent12.1.0.5/12.1.0.5.0_PluginsOneoffs_226.zip -d /oem/oracle/agent12c

Successfully unzipped /oem/oracle/OEM_Agent12.1.0.5/12.1.0.5.0_PluginsOneoffs_226.zip to /oem/oracle/agent12c !

Executing command : /oem/oracle/agent12c/core/12.1.0.5.0/jdk/bin/java -classpath /oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/OraInstaller.jar:/oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/xmlparserv2.jar:/oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/srvm.jar:/oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/emCfg.jar:/oem/oracle/agent12c/core/12.1.0.5.0/jlib/agentInstaller.jar:/oem/oracle/agent12c/core/12.1.0.5.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /oem/oracle/agent12c/core/12.1.0.5.0 /oem/oracle/OEM_Agent12.1.0.5 /oem/oracle/agent12c /oem/oracle/agent12c/agent_inst AGENT_BASE_DIR=/oem/oracle/agent12c

 

 

Executing agent install prereqs...

Executing command: /oem/oracle/agent12c/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion  -prereqlogloc /oem/oracle/agent12c/core/12.1.0.5.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/oem/oracle/agent12c/core/12.1.0.5.0/prereqs  -J-DORACLE_HOSTNAME=funoel8.lab INVENTORY_LOCATION=/etc/oraInventory -J-DAGENT_PORT=3872 -J-DAGENT_BASE_DIR=/oem/oracle/agent12c

 

Agent install prereqs completed successfully

 

Cloning the agent home...

Executing command: /oem/oracle/agent12c/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/oem/oracle/agent12c/core/12.1.0.5.0 -responseFile /oem/oracle/OEM_Agent12.1.0.5/agent.rsp  AGENT_BASE_DIR=/oem/oracle/agent12c AGENT_BASE_DIR=/oem/oracle/agent12c RESPONSE_FILE=/oem/oracle/OEM_Agent12.1.0.5/agent.rsp INVENTORY_LOCATION=/etc/oraInventory -noconfig  ORACLE_HOME_NAME=agent12gR1 INVENTORY_LOCATION=/etc/oraInventory -force b_noUpgrade=true EMCTLCFG_MODE=NONE

 

Cloning of agent home completed successfully

 

Attaching sbin home...

Executing command: /oem/oracle/agent12c/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/oem/oracle/agent12c/sbin ORACLE_HOME_NAME=sbin12c1 INVENTORY_LOCATION=/etc/oraInventory -force

 

Attach home for sbin home completed successfully.

 

Updating home dependencies...

Executing command: /oem/oracle/agent12c/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/oem/oracle/agent12c/sbin:/oem/oracle/agent12c/core/12.1.0.5.0} -invPtrLoc /oem/oracle/agent12c/core/12.1.0.5.0/oraInst.loc -force

 

Update home dependency completed successfully.

Executing command: /oem/oracle/agent12c/core/12.1.0.5.0/oui/bin/runConfig.sh ORACLE_HOME=/oem/oracle/agent12c/core/12.1.0.5.0 RESPONSE_FILE=/oem/oracle/agent12c/core/12.1.0.5.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

 /oem/oracle/agent12c/core/12.1.0.5.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: /oem/oracle/agent12c/core/12.1.0.5.0/cfgtoollogs/agentDeploy/agentDeploy_2021-05-08_00-11-45-AM.log

Agent deployment completed successfully.

 

From root user execute

 

[root@funoel8 log]# /oem/oracle/agent12c/core/12.1.0.5.0/root.sh

Finished product-specific root actions.

/etc exist

 

Creating /etc/oragchomelist file...

 

 

Please validate the agent on the target server. It should be up and running.

 

emctl status agent

 





If you like please follow and comment