Silent Installation of OEM Agent on Windows

Silent installation is less known, but a more easier method to install OEM agent. Silent installation does not have any dependency on Cygwin also. Silent installation is supported on Linux 64 bit and on Windows 64 bit operating systems.

The below procedure shows how we can install agent silently on a Windows system. The OMS server runs on Red Hat Enterprise Linux Server release 6.6 and the version is

To begin with, we need to add destination host's (where we install the agent) details in OMS host's /etc/hosts file.

$ cat /etc/hosts     agent_box

If the host on which agent is being installed belongs to another domain than OMS server, we need to add OMS host's deatils in hosts file of Windows box as well.

To do this, open the file C:\Windows\System32\drivers\etc\hosts and add the below entry.     oms_box

If both OMS server and agent server belongs to same domain, entry in Windows' host file is not a necessity.

To know the platforms that support silent installation, log in to emcli by supplying the password of SYSMAN user.

$ ./emcli login -username=sysman
Enter password :

Login successful

Now, execute the below command to know of the supported platforms

oracle@cct-rad-r401: cd $OMS_HOME/bin
$ ./emcli get_supported_platforms
Version =
Platform = Microsoft Windows x64 (64-bit)
Version =
Platform = Linux x86-64
Platforms list displayed successfully.

Next, we use emcli to create agent image for Windows OS. It is this image that we use to install the agent on Windows.

$ ./emcli get_agentimage -destination=/tmp/agentImage -platform="Microsoft Windows x64 (64-bit)" -version=

Output from above command

=== Partition Detail ===
Space free : 191 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/Gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2015-06-10_01-29-03-AM.log
Downloading /tmp/agentImage/
File saved as /tmp/agentImage/
Downloading /tmp/agentImage/
File saved as /tmp/agentImage/
Downloading /tmp/agentImage/unzip
File saved as /tmp/agentImage/unzip
ERROR: Command /tmp/agentImage/unzip /tmp/agentImage/ -d /tmp/agentImage execution failed.
RECOMMENDATION: If your agent image platform and the emcli client setup is on a different platform then you need to set the environment variable ZIP_LOC to absolute path to the zip utility which is greater than or equal to version 3.0.
Example: setenv ZIP_LOC /usr/local/bin/zip

I came across an unzip error which is ignorable.

Copy the directory /tmp/agentImage to Windows machine and unzip the below files within agentImage directory.

Next, enable Windows firewall to allow incoming connections to port 3872. Check this to enable the port.

A response file under by name agent.rsp will be used by installer while installing agent. This file has to be edited. The below sample can be used as referrence.
#s_agentHomeName=<Value Unspecified>

Most of the parameters are self-explanatory, but I am emphasysing some of them below.

Create the agent base directory D:\Oralce_OEM_12c_Agent and install the agent using below command.

C:> cd D:\agentImage\

D:\agentImage\> agentDeploy.bat AGENT_BASE_DIR=D:\Oralce_OEM_12c_Agent RESPONSE_FILE=D:\agentImage\\agent.rsp

The output is below.

Present working directory:D:\agentImage\
Archive location:D:\agentImage\ directory
Agent base directory:D:\Oracle_OEM_12c_Agent
Agent base directory:D:\Oracle_OEM_12c_Agent
OMS Host:
Agent image loc : "D:\agentImage\"
D:\Oracle_OEM_12c_Agent configonlyfalse
Reading the properties file: "D:\agentImage\\"
       1 file(s) copied.
This is the version
This is the type core
This is the aru id 233
"Validating the OMS_HOST & EM_UPLOAD_PORT"
"Executing command : D:\Oracle_OEM_12c_Agent\core\\jdk\bin\java -classpath D:\Oracle_OEM_12c_Agent\core\\jlib\agentInstaller.jar:D:\Oracle_OEM_12c_Agent\core\\oui\jlib\OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller D:\Oracle_OEM_12c_Agent\core\ "D:\agentImage" D:\Oracle_OEM_12c_Agent -prereq"

Validating oms host & port with url:
Validating oms host & port with url:
Return status:3-oms https port is passed
"Executing command : D:\Oracle_OEM_12c_Agent\core\\jdk\bin\java -classpath D:\Oracle_OEM_12c_Agent\core\\jlib\OraInstaller.jar:D:\Oracle_OEM_12c_Agent\core\\sysman\jlib\emInstaller.jar:D:\Oracle_OEM_12c_Agent\core\\jlib\xmlparserv2.jar:D:\Oracle_OEM_12c_Agent\core\\jlib\srvm.jar:D:\Oracle_OEM_12c_Agent\core\\jlib\emCfg.jar:D:\Oracle_OEM_12c_Agent\core\\sysman\jlib\agentInstaller.jar oracle.sysman.agent.installer.AgentInstaller D:\Oracle_OEM_12c_Agent\core\"

Executing agent install prereqs...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion -prereqlogloc D:\Oracle_OEM_12c_Agent\core\\cfgtoollogs\agentDeploy -entryPoint -detailedExitCodes PREREQ_CONFIG_LOCATION=D:\Oracle_OEM_12c_Agent\core\\prereqs -J-DAGENT_PORT=3872

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=D:\Oracle_OEM_12c_Agent\core\ -responseFile D:\agentImage\agent.rsp AGENT_BASE_DIR=D:/Oracle_OEM_12c_Agent AGENT_BASE_DIR=D:/Oracle_OEM_12c_Agent RESPONSE_FILE=D:\agentImage\agent.rsp -noconfig ORACLE_HOME_NAME=agent12c1 -force b_noUpgrade=true

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=D:\Oracle_OEM_12c_Agent\sbin ORACLE_HOME_NAME=sbin12c1 -force

Attach home for sbin home completed successfully.

Updating home dependencies...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={D:\Oracle_OEM_12c_Agent\sbin:D:\Oracle_OEM_12c_Agent\core\} -invPtrLoc D:\Oracle_OEM_12c_Agent\core\\oraInst.loc -force

Update home dependency completed successfully.
Executing command: D:\Oracle_OEM_12c_Agent\core\\oui\bin\runConfig.bat ORACLE_HOME=D:\Oracle_OEM_12c_Agent\core\ RESPONSE_FILE=D:\Oracle_OEM_12c_Agent\core\\agent.rsp ACTION=configure MODE=perform COMPONENT_XML={} RERUN=true
Agent Configuration completed successfully
Agent deployment log location: D:\Oracle_OEM_12c_Agent\core\\cfgtoollogs\agentDeploy\agentDeploy_2015-07-07_23-47-33-PM.log
Agent deployment completed successfully.

The output shows the installation of agent is completed successfully.

Check the status of agent. Open cmd and execute below commands.

C:\> D:
D:\> cd D:\Oracle_OEM_12c_Agent\core\\bin
D:\Oracle_OEM_12c_Agent\core\\bin> emctl status agent

The output is below.

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Agent Version          :
OMS Version            :
Protocol Version       :
Agent Home             : D:/Oracle_OEM_12c_Agent/agent_inst
Agent Log Directory    : D:/Oracle_OEM_12c_Agent/agent_inst\sysman\log
Agent Binaries         : D:\Oracle_OEM_12c_Agent\core\
Agent Process ID       : 3312
Parent Process ID      : 7608
Agent URL              :
Local Agent URL in NAT :
Repository URL         :
Started at             : 2015-07-08 06:08:01
Started by user        : OMS_BOX$
Operating System       : Windows version 6.1 (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-07-09 01:39:52
Last attempted upload                        : 2015-07-09 01:39:52
Total Megabytes of XML files uploaded so far : 0.86
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 63.52%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-07-09 01:43:47
Last successful heartbeat to OMS             : 2015-07-09 01:43:47
Next scheduled heartbeat to OMS              : 2015-07-09 01:44:47

Agent is Running and Ready

The output shows Agent is Running and Ready

Check if the default targets are listed by emctl

D:\Oracle_OEM_12c_Agent\core\\bin>emctl config agent listtargets

Output from above command

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
[, host]
[, oracle_emd]
[, oracle_home]
This shows that three default targets are monitored

If you do not see the default targets, execute the blow command

D:\Oralce_OEM_12c_Agent\core\\bin>emctl config agent addinternaltargets

Output from above command

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

Try it one more time to list targets

D:\Oracle_OEM_12c_Agent\core\\bin>emctl config agent listtargets

Upload the agent data to OMS

D:\Oralce_OEM_12c_Agent\core\\bin>emctl upload agent

From OMS Server, connect as sysman

sqlplus sysman/password

SQL> SELECT target_name, target_type, timezone_region, host_name, emd_url,last_load_time, broken_reason,
  2  broken_str, last_updated_time, manage_status, is_active, promote_status, oracle_home, is_ready
  3  FROM mgmt_targets
  4 WHERE upper (target_name) LIKE '%AGENT_BOX%'
  5 ORDER BY target_type;

If you've gotten the output seen in this post, your intallation of agent is successful.

Hope this helps ...