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 12.1.0.4.

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
192.168.1.22     agent_box.abc.com     agent_box
Note

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.

192.168.1.44     oms_box.xyz.com     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 = 12.1.0.4.0
Platform = Microsoft Windows x64 (64-bit)
---------------------------------------------------------
Version = 12.1.0.4.0
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=12.1.0.4.0

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/12.1.0.4.0_AgentCore_233.zip
File saved as /tmp/agentImage/12.1.0.4.0_AgentCore_233.zip
Downloading /tmp/agentImage/12.1.0.4.0_PluginsOneoffs_233.zip
File saved as /tmp/agentImage/12.1.0.4.0_PluginsOneoffs_233.zip
Downloading /tmp/agentImage/unzip
File saved as /tmp/agentImage/unzip
ERROR: Command /tmp/agentImage/unzip /tmp/agentImage/12.1.0.4.0_AgentCore_233.zip agentcoreimage.zip -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 12.1.0.4.0_AgentCore_233 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.

OMS_HOST=oms_box.xyz.com
EM_UPLOAD_PORT=4900
AGENT_REGISTRATION_PASSWORD=agent_12#
AGENT_INSTANCE_HOME=D:\Oracle_OEM_12c_Agent\agent_inst
AGENT_PORT=3872
b_startAgent=true
ORACLE_HOSTNAME=agent_box.abc.com
#s_agentHomeName=<Value Unspecified>
EM_INSTALL_TYPE="AGENT"

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\12.1.0.4.0_AgentCore_233

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

The output is below.

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

Validating oms host & port with url: http://oms_box.xyz.com:4900/empbs/genwallet
Validating oms host & port with url: https://oms_box.xyz.com:4900/empbs/genwallet
Return status:3-oms https port is passed
"D:\agentImage\12.1.0.4.0_AgentCore_233"\12.1.0.4.0_PluginsOneoffs_233.zip
"Executing command : D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\jdk\bin\java -classpath D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\jlib\OraInstaller.jar:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\sysman\jlib\emInstaller.jar:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\jlib\xmlparserv2.jar:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\jlib\srvm.jar:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\jlib\emCfg.jar:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\sysman\jlib\agentInstaller.jar oracle.sysman.agent.installer.AgentInstaller D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0"


Executing agent install prereqs...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion -prereqlogloc D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\cfgtoollogs\agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\prereqs -J-DORACLE_HOSTNAME=EVSRPWV407.wellsfargo.com -J-DAGENT_PORT=3872

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: cmd /c D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0 -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\12.1.0.4.0\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\12.1.0.4.0\oui\bin\setup.exe -debug -noconsole -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={D:\Oracle_OEM_12c_Agent\sbin:D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0} -invPtrLoc D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\oraInst.loc -force

Update home dependency completed successfully.
Executing command: D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\oui\bin\runConfig.bat ORACLE_HOME=D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0 RESPONSE_FILE=D:\Oracle_OEM_12c_Agent\core\12.1.0.4.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
Agent deployment log location: D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\cfgtoollogs\agentDeploy\agentDeploy_2015-07-07_23-47-33-PM.log
Agent deployment completed successfully.
D:\agentImage>

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\12.1.0.4.0\bin
D:\Oracle_OEM_12c_Agent\core\12.1.0.4.0\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          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
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\12.1.0.4.0
Agent Process ID       : 3312
Parent Process ID      : 7608
Agent URL              : https://oms_box.xyz.com:3872/emd/main/
Local Agent URL in NAT : https://oms_box.xyz.com:3872/emd/main/
Repository URL         : https://oms_box.xyz.com:4900/empbs/upload
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\12.1.0.4.0\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.
[agent_box.abc.com, host]
[agent_box.abc.com:3872, oracle_emd]
[agent12c1_1_agent_box.abc.com, 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\12.1.0.4.0\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\12.1.0.4.0\bin>emctl config agent listtargets

Upload the agent data to OMS

D:\Oralce_OEM_12c_Agent\core\12.1.0.4.0\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 ...

Comments