EM12c agent installation for Windows hosts…without Cygwin!

The majority of Enterprise Manager 12c Cloud Control agent installations are pretty straight forward, just do the usual checks, ensuring firewalls are open etc. and then deploy from the EM console.  The Windows installations are not as straight forward these days, as the deployment method uses SSH connectivity which requires the installation and configuration of Cygwin as a pre-requisite :( …this is time consuming, confusing at times (if you’ve not done it before), and isn’t needed thereafter, so this post outlines an alternative and quicker way of rolling out the agent to Windows machines, using the silent install method…

The example below is based around my EM12c OMS running from an Oracle Linux 6.4 machine (VM0112), with the agent being deployed to a Windows Server 2003 x64 (64-bit) machine (VM0201).

First of all, you need to make sure  the software library has already been configured in EM12c.  I’d imagine most people at this stage have this setup already, but if not take a look here.

Check software availability using EMCLI from OMS

We need to connect to the EM repository using EMCLI and check which agents are available i.e. images that have been downloaded and applied:

export OMS_HOME=/u01/app/oracle/middleware/em12cr3/oms
export AGENT_HOME=/u01/app/oracle/agent12c/core/12.1.0.3.0
export JAVA_HOME=$AGENT_HOME/jdk

Login as the SYSMAN user:

$OMS_HOME/bin/emcli login -username=sysman -password=******
Login successful

Fetch a list of agent software available from the the repository:

$OMS_HOME/bin/emcli get_supported_platforms
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

In this example, you can see I only have the agent software available for Linux.  If you already have the software, ignore the next section and move onto building the image.

Download the Microsoft agent software

I won’t go into too much detail about how to do this, but you need to ensure you’re My Oracle Support connection has been configured in EM12c, then navigate to:

Setup > Extensibility > Self Update > Agent Updates

From here you can check for the latest updates and download the required software.  In this case, I’m after the latest ‘Microsoft Windows x64 (64-bit)’, which at the time of writing is version 12.1.0.3.0.  Screenshots as below…

 

 

 

 

 

 

 

Once the download has completed and been applied to the software library, go back to your EMCLI session, run a synchronize command and check again:

$OMS_HOME/bin/emcli sync
Synchronized successfully

$OMS_HOME/bin/emcli get_supported_platforms
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Linux x86-64
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------
Platforms list displayed successfully.

Build an image for the agent

My software library simply sits under /swlib on my OMS machine.  I’m going to create a sub-directory here for this particular agent, then generate a zip file that can be used to deploy the agent locally from my Windows x64 server.

mkdir /swlib/win_x64_agent
export ZIP_LOC=/usr/bin/zip

NOTE: It’s important to set ZIP_LOC here, otherwise you’re likely to get an ‘execution failed’ message during the build (MOS 1590393.1).

Again using EMCLI, run the following command to generate a zip file (checking the platform and version):

$OMS_HOME/bin/emcli get_agentimage -destination="/swlib/win_x64_agent" -platform="Microsoft Windows x64 (64-bit)" -version=12.1.0.3.0

=== Partition Detail ===
Space free : 18 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2014-02-06_10-21-17-AM.log
Downloading /swlib/win_x64_agent/12.1.0.3.0_AgentCore_233.zip
File saved as /swlib/win_x64_agent/12.1.0.3.0_AgentCore_233.zip
Downloading /swlib/win_x64_agent/12.1.0.3.0_PluginsOneoffs_233.zip
File saved as /swlib/win_x64_agent/12.1.0.3.0_PluginsOneoffs_233.zip
Downloading /swlib/win_x64_agent/unzip
File saved as /swlib/win_x64_agent/unzip
Agent Image Download completed successfully.

Now you can copy the ‘12.1.0.3.0_AgentCore_233.zip’ file across to your Windows server where you want to install the agent (using something like FileZilla or WinSCP):

Unzip the contents to a sensible directory like D:\app\oracle\agent12c

Update installation files

Edit the agent response file (agent.rsp) accordingly:

# OMS host name
OMS_HOST=VM0112.vbox
# OMS upload port
EM_UPLOAD_PORT=4904
# Password for registering new agents
AGENT_REGISTRATION_PASSWORD=password1
# Base installation directory
AGENT_BASE_DIR=D:\app\oracle\agent12c
# Instance home directory
AGENT_INSTANCE_HOME=D:\app\oracle\agent12c\agent_inst
# Agent communication port
AGENT_PORT=3872
# Starts the agent after the install
b_startAgent=true
# Oracle home name
s_agentHomeName=agent12gR3
# Fully qualified host name where agent is to be installed
ORACLE_HOSTNAME=VM0201.vbox

Save these changes.

If you’re not sure on the ports, you can check these details by looking at the following file on your OMS:

$OMS_HOME/install/portlist.ini

If you’ve got loads of Windows agents to deploy, then it’s probably worth editing the agent.rsp file at source instead (editing the copy within the zip file on the OMS), but I didn’t bother here as there were only a few to deploy.

Optionally, add an entry into your hosts file for the OMS (C:\Windows\system32\drivers\etc\hosts)

# Oracle Enterprise Manager server
192.168.28.112     VM0112.vbox     VM0112

Install the agent

Finally, execute the batch file (agentDeploy.bat) to deploy the agent, where ORACLE_HOSTNAME is the Windows machine you’re deploying the agent to:

agentDeploy.bat RESPONSE_FILE=D:\app\oracle\agent12c\12.1.0.3.0_AgentCore_233\agent.rsp

You can monitor progress by checking the following log file:

D:\app\oracle\agent12c\12.1.0.3.0_AgentCore_233\agentDeploy.log

You’ll likely see an error like the one below part way through the install.  It’s nothing to worry about, just a permissions issue which can be safely ignored.  So just close the window by clicking on the ‘X':

That’s it, agent deployed! :)

References:
Installing Oracle Management Agent in Silent Mode
Installing Cygwin and Starting the SSH Daemon

 

Leave a comment

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>