Skip to main content

How to Manually Deploy the OEM agent on Server using EMCLI

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

Comments

Popular posts from this blog

WebLogic migration to OCI using WDT tool

WebLogic migration to OCI using WDT tool Oracle WebLogic Deploy Tool (WDT) is an open-source project designed to simplify and streamline the management of Oracle WebLogic Server domains. With WDT, you can export configuration and application files from one WebLogic Server domain and import them into another, making it a highly effective tool for tasks like migrating on-premises WebLogic configurations to Oracle Cloud. This blog outlines a detailed step-by-step process for using WDT to migrate WebLogic resources and configurations. Supported WLS versions Why Use WDT for Migration? When moving Oracle WebLogic resources from an on-premises environment to Oracle Cloud (or another WebLogic Server), WDT provides an efficient and reliable approach to: Discover and export domain configurations and application binaries. Create reusable models and archives for deployment in a target domain. Key Pre-Requisites Source System: An Oracle WebLogic Server with pre-configured resources such as: Applica...

How to Validate TDE Wallet Password in Oracle Database

How to Validate TDE Wallet Password in Oracle Database Validating the Transparent Data Encryption (TDE) wallet password is crucial, especially when ensuring that the password is correct without using the OPEN or CLOSE commands in the database. This blog post explains a straightforward method to validate the TDE password using the mkstore utility. Steps to Validate TDE Wallet Password Follow these steps to validate the TDE wallet password: Step 1: Copy the Keystore/Wallet File Navigate to your existing TDE wallet directory. Copy only the ewallet.p12 file to a new directory. If a cwallet.sso file exists, do not copy it . The absence of cwallet.sso ensures that the wallet does not use auto-login, forcing the utility to prompt for the password. Step 2: Validate Using mkstore Use the mkstore utility to check the contents of the wallet file. The mkstore utility will prompt you for the TDE wallet password, allowing you to validate its correctness. Command Syntax To display the conten...

EBS 12.2 ADOP Interview Questions With Scenarios

EBS 12.2 ADOP Interview Questions With Scenarios Note: Check the patch cycle log is important to fix any issues.  Location: $ADOP_LOG_HOME Useful Adop Commands Click here 1.What is ADOP concept in oracle apps Online patching is the most important new feature in Oracle E-Business Suite Release 12.2. It is the ability to patch a running system without having to take the system down for a significant period of time while the patches are applied. 'adop' is the utility we use to apply patches in R12.2 2.What is PATCH_TOP directory in R12.2 In R12.2 there is a new directory location environment variable called $PATCH_TOP which points to $NE_BASE/EBSapps/patch $NE_BASE points to <Non-Editioned-filesystem-directory> Download the patch into the patch top directory and unzip it. This is the default location where the adop will look for patch files. If you are planning to put patches in non-defualt location then you need to use adop parameter 'patchtop=<patch_path>' to...