As of late, I’ve had to do a few Windows OS Agent Deployments. As we all know, if you want to auto deploy to a Windows OS, you need to have CygWin installed (on each target host) first.The alternative, via Silent Install, is illustrated by my good friend Bobby Curtis here. However, for large scale quicker deployments, I came up with an a solution which worked quite well.Assuming you have already download the agent binaries from the OMS server, copy them to a centralized location accessible to all target hosts.In my case, I used \\slave\software\oracle\oem\12.1.0.3.0\agent.
The important thing here is the content of the agent.rsp file. Mine looks like this. I did not keep the ORACLE_HOSTNAME parameter within the response file (agent.rsp).
#################################################################### ## copyright (c) 1999, 2012 Oracle. All rights reserved. ## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## ## ## ## Each variable is associated with a comment. The comment ## ## identifies the variable type. ## ## ## ## Please specify the values in the following format: ## ## ## ## Type Example ## ## String "Sample Value" ## ## Boolean True or False ## ## Number 1000 ## ## StringList {"String value 1","String Value 2"} ## ## ## ## The values that are given as need to be ## ## specified for a silent installation to be successful. ## ## ## ## ## ## This response file is generated by Oracle Software ## ## Packager. ## ################################################################### RESPONSEFILE_VERSION=2.2.1.0.0 #------------------------------------------------------------------------------- #OMS_HOST: OMS host info required to connect to OMS #EM_UPLOAD_PORT: OMS port info required to connect to OMS #AGENT_REGISTRATION_PASSWORD: Agent Registration Password needed to # establish a secure connection to the OMS. #AGENT_INSTANCE_HOME: Agent instance home is the location of agent state directory. #AGENT_PORT: Agent port on which the agent process should be started. #b_startAgent: Agent will not be started after configuration if the value specified is false. #ORACLE_HOSTNAME: Fully qualified domain name of host where is the agent is deployed. #s_agentHomeName:Customized Oracle home name for the agent home. Example: s_agentHomeName="agent12gR1" #------------------------------------------------------------------------------- OMS_HOST=cruiser.missile.com EM_UPLOAD_PORT=4899 AGENT_REGISTRATION_PASSWORD=you_havent_changed_the_sysman_password AGENT_INSTANCE_HOME=D:\oracle\app\product\12.1\agent AGENT_PORT=3875 b_startAgent=true s_agentHomeName=agent12c_home1 #------------------------------------------------------------------------------- #s_agentServiceName: Sets the agent Service Name and this variable can be # used to overrite the agent service name calculated by the install. This is # required for only Windows. # Example: # s_agentServiceName = "Oracleagent12gAgent" ; default value # s_agentServiceName = "GridAgent" ; User specified value #------------------------------------------------------------------------------- s_agentServiceName="Oracleagent12cAgent" #################################################################################### #Please Don't change the values of these variables #################################################################################### #------------------------------------------------------------------------------- #EM_INSTALL_TYPE: install type #------------------------------------------------------------------------------- EM_INSTALL_TYPE="AGENT"
I then created a wrapper install script. Since I was deploying on windows, the script looked like
c:\> view DeployTheAgent.bat \\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.bat AGENT_BASE_DIR=D:\Oracle\app\product\12.1 RESPONSE_FILE=\\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rsp ORACLE_HOSTNAME=%COMPUTERNAME%.%USERDNSDOMAIN%
The linux version of this might look something like
$ cat DeployTheAgent.sh \\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/product/12.1 RESPONSE_FILE=\\agent.rsp ORACLE_HOSTNAME=hostname.domainname
From here, its a simple as invoking the script from the target host:
c:\>\\slave\software\oracle\oem\12.1.0.3.0\agent\DeployTheAgent.bat \\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.bat AGENT_BASE_DIR=D:\Oracle\app\product\12.1 RESPONSE_FILE=\\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rsp ORACLE_HOSTNAME=javelin.missile.com \\slave\software\oracle\oem\12.1.0.3.0\agent Present working directory:\\slave\software\oracle\oem\12.1.0.3.0\agent Archive location:\\slave\software\oracle\oem\12.1.0.3.0\agent directory AGENT_BASE_DIR AGENT_BASE_DIR D:\Oracle\app\product\12.1 Agent base directory:D:\Oracle\app\product\12.1 D:\Oracle\app\product\12.1 RESPONSE_FILE \\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rspORACLE_HOSTNAME javelin.missile.com Agent base directory:D:\Oracle\app\product\12.1 OMS Host: Agent image loc : "\\slave\software\oracle\oem\12.1.0.3.0\agent" D:\Oracle\app\product\12.1 configonlyfalse Reading the properties file: "\\slave\software\oracle\oem\12.1.0.3.0\agent"\agentimage.properties 1 file(s) copied. This is the version 12.1.0.2.0 This is the type core This is the aru id 233
The installer takes a few minutes and I’d rather not bore you with the contents of the log files. You know what you are doing :)So, for any new target host, simply invoke the DeployAgent.bat or DeployAgent.sh script and relax! Assuming that your paths are correct and, network ports are accessible, the installation should go through without any glitches.
Reference:Oracle Documentation: Installing Oracle Management Agent in Silent Mode
Reference:Oracle Documentation: Installing Oracle Management Agent in Silent Mode
I found that in order to install on Windows, I needed to use double back slashes in the AGENT.RSP file if going deeper than one directory. Using the example above it would look like this.
AGENT_INSTANCE_HOME=D:\\oracle\\app\\product\\12.1\\agent
work like a charm .)
Good to hear and thanks for the feedback!
Thanks for sharing your alteration. Glad it was helpful!
Thanks for this. This seems alot easier than all the manual entering of prompts in the GUI and is similar to the way it worked in 11.1.
That is correct, even though the mass deployment feature via the GUI is great, it does become a bit cumbersome for Windows based hosts.
Thanks for the feedback!
Hi Maaz, awesome blog and articles!
Before going through the steps, I’d like to ask about “downloading the agent binary from the OMS server”. My OMS host is windows 2008 and target agent is linux redhat. How to download an agent from OMS host?
I’m using this, is it correct ? –> ./emctl get_agentimage –destination=C:\downloads –platform=”Microsoft Windows x64 (64-bit)” –version=12.1.0.2.0
Or is this one correct also ? –> https://:/em/install/getAgentImage
Hi Olie,
Thanks for the feedback! Please note that the article I wrote was for version 12.1.0.2 (a couple of years ago). If you are running 12.1.0.4, then take a look at this documentation. It seems the EM team has come up with something similar to what I wrote about for silent installs 🙂
http://docs.oracle.com/cd/E24628_01/install.121/e24089/install_agent_usng_rsp.htm#BABBFAAD
Cheers and good luck!
Maaz