Silent Installation of OEM 12c agent: manually using emcli, scripts and response file



The Eucharistic Miracles of the World
We need to install the OEM agent in the target server which we need to monitor from the OEM console. Generally, we can do this by OEM console itself. If it allows the agent installation through OEM is well and good as it is the easiest way. Sometimes we as DBA faces issues in installing the agents in the target server by the OEM console add host, target options. In such situations we can use below method to install the agent in the target server and easy we get it monitored from the OEM. 

There are 2 parts for this activity. 

Part #1 is in the OEM server where we installed the OEM software. 

Part #2 is in the target server which needs to be monitored 

Part #1: OEM Server 
Step 1: Check the emcli login is successful or not.

[oracle@OEM bin]$ ./emcli login -username=sysman -password=password1
Login successful

Step 2: Synchronize emcli

[oracle@OEM bin]$ ./emcli sync
Synchronized successfully

Step 3: List out the list of supported platforms.

[oracle@OEM bin]$ ./emcli get_supported_platforms
Version =
 Platform = Linux x86-64
Platforms list displayed successfully.

Step 4: Generate an image from the OEM server which needs to be installed in the target server.

[oracle@OEM bin]$ ./emcli get_agentimage -destination=/u01/installs/agent -platform="Linux x86-64" -version=
 === Partition Detail ===
Space free : 18 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2016-07-14_07-31-26-AM.log
Downloading /u01/installs/agent/
File saved as /u01/installs/agent/
Downloading /u01/installs/agent/
File saved as /u01/installs/agent/
Downloading /u01/installs/agent/unzip
File saved as /u01/installs/agent/unzip
Agent Image Download completed successfully.

Step 5: SCP the file ( to target host and unzip it 

Step 6: Get the required information from the OEM server using following command. Highlighted information is required.

[oracle@OEM oms]$ ./bin/emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        :
HTTP Console Port          : 7788
HTTPS Console Port         : 7803
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/app/oracle/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL:
Upload URL:

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      :
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host:
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host

Part #2: Target Server 
Step 1: unzip the file

  inflating: unzip
  inflating: agent.rsp
 extracting:      ls -tlr

[oracle@TargetHost emagent]$ ls -tlr
total 502264
-rw-rw-r-- 1 oracle oinstall       178 Jun 11  2015
-rwxr-xr-x 1 oracle oinstall    145976 Jun 11  2015 unzip
-rwxrwxr-x 1 oracle oinstall      3775 Jun 11  2015 agent.rsp
-rwxrwxr-x 1 oracle oinstall     29124 Jun 11  2015
-rw-rw-r-- 1 oracle oinstall 250059880 Jun 11  2015
-rw-r----- 1 oracle oinstall   6961671 Jul 14 07:32
-rw-r----- 1 oracle oinstall 257102519 Jul 14 07:38

Step 2: Add the following entry in agent.rsp file

[oracle@TargetHost emagent]$ vi agent.rsp #IP of the OEM server
EM_UPLOAD_PORT=4889 # Port number highlighted Step#5 in the Part #1

Step 3: Deploy the agent

[oracle@TargetHost emagent]$ ./ AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp

Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/app/oracle/product/12.1.0/agent/core/ -classpath /u01/app/oracle/product/12.1.0/agent/core/ oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/product/12.1.0/agent/core/ /u01/installs/emagent /u01/app/oracle/product/12.1.0/agent AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp -prereq

Validating oms host & port with url:
Validating oms host & port with url:
Return status:0-oms http port is passed
Unzipping the to /u01/app/oracle/product/12.1.0/agent ....
Executing command : /u01/installs/emagent/unzip -o /u01/installs/emagent/ -d /u01/app/oracle/product/12.1.0/agent
Successfully unzipped /u01/installs/emagent/ to /u01/app/oracle/product/12.1.0/agent !
Executing command : /u01/app/oracle/product/12.1.0/agent/core/ -classpath /u01/app/oracle/product/12.1.0/agent/core/ oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/product/12.1.0/agent/core/ /u01/installs/emagent /u01/app/oracle/product/12.1.0/agent /u01/app/oracle/product/12.1.0/agent/agent_inst AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent

Executing agent install prereqs...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/ -debug -ignoreSysPrereqs   -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion  -prereqlogloc /u01/app/oracle/product/12.1.0/agent/core/ -entryPoint -detailedExitCodes PREREQ_CONFIG_LOCATION=/u01/app/oracle/product/12.1.0/agent/core/  -J-DAGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/ -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/core/ -responseFile /u01/installs/emagent/agent.rsp  AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12c2 -force b_noUpgrade=true AGENT_PORT=-1 EMCTLCFG_MODE=NONE

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/ -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/sbin ORACLE_HOME_NAME=sbin12c2 -force

Attach home for sbin home completed successfully.

Updating home dependencies...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/ -debug -ignoreSysPrereqs   -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/u01/app/oracle/product/12.1.0/agent/sbin:/u01/app/oracle/product/12.1.0/agent/core/} -invPtrLoc /u01/app/oracle/product/12.1.0/agent/core/ -force

Update home dependency completed successfully.
Executing command: /u01/app/oracle/product/12.1.0/agent/core/ ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/core/ RESPONSE_FILE=/u01/app/oracle/product/12.1.0/agent/core/ ACTION=configure MODE=perform COMPONENT_XML={} RERUN=true
Agent Configuration completed successfully

Step 4: The following configuration scripts need to be executed as the "root" user.

#Root script to run
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: /u01/app/oracle/product/12.1.0/agent/core/
Agent deployment completed successfully.

Now in the OEM you will be able to see the target from this host also.


Website Stats


Post a Comment


Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2) Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer