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/product/middleware/em12cr3/oms export AGENT_HOME=/u01/app/oracle/product/agent12c/core/184.108.40.206.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 = 220.127.116.11.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 Software
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 18.104.22.168.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 = 22.214.171.124.0 Platform = Linux x86-64 ----------------------------------------------- Version = 126.96.36.199.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=188.8.131.52.0 === Partition Detail === Space free : 18 GB Space required : 1 GB Check the logs at /u01/app/oracle/product/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/184.108.40.206.0_AgentCore_233.zip File saved as /swlib/win_x64_agent/220.127.116.11.0_AgentCore_233.zip Downloading /swlib/win_x64_agent/18.104.22.168.0_PluginsOneoffs_233.zip File saved as /swlib/win_x64_agent/22.214.171.124.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 ‘126.96.36.199.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 temporary directory like: D:\temp\188.8.131.52.0_AgentCore_233
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\product\agent12c # Instance home directory AGENT_INSTANCE_HOME=D:\app\oracle\product\agent12c\agent_inst # Agent communication port AGENT_PORT=3872 # Starts the agent after the install b_startAgent=true # Oracle home name s_agentHomeName=agent12cR3 # 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:
…or by running the following emctl command:
$OMS_HOME/bin/emctl status oms -details
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 (if not using DNS for example), 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
Check network port access
Next , check that the local Windows Firewall is either disabled or allows connectivity to the OMS server via the upload and agent ports (4904,3872 in this example). In addition, make sure there are no other firewalls blocking connectivity. You can do this tools like telnet, PortQry or PowerShell. With recent versions of PowerShell, there is a Test-NetConnection cmdlet which does the job nicely…
PS C:\Users\oracle> Test-NetConnection -ComputerName VM0112.vbox -Port 3872 ComputerName : VM0112.vbox RemoteAddress : 192.168.28.112 RemotePort : 3872 InterfaceAlias : Internal SourceAddress : 192.168.28.201 PingSucceeded : True PingReplyDetails (RTT) : 5 ms TcpTestSucceeded : True PS C:\Users\oracle> Test-NetConnection -ComputerName VM0112.vbox -Port 4904 ComputerName : VM0112.vbox RemoteAddress : 192.168.28.112 RemotePort : 4904 InterfaceAlias : Internal SourceAddress : 192.168.28.201 PingSucceeded : True PingReplyDetails (RTT) : 4 ms TcpTestSucceeded : True
Install the agent
Finally, execute the following batch file to deploy the agent from an Administrator Command Prompt (remembering to update ORACLE_HOSTNAME accordingly in your .rsp file):
NOTE: If you hit the “Invalid invocation. AGENT_BASE_DIR is mandatory.” error, you’ll need to edit the agentDeploy.bat script itself to include the following variable there too:
Progress updates can be monitored through the Command Prompt window.
Here is the output from an 184.108.40.206.0 agent deployment as an example:
You might 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! You should see the host and agent targets registered in Enterprise Manager shortly 🙂
You can check the status of the agent by running the following emctl command:
set AGENT_HOME=D:\app\oracle\product\agent12c %AGENT_HOME%\agent_inst\bin\emctl status agent