Installing 12c Agent on Windows using PsExec
Â
Installing Oracle Management Agent in Silent Mode
Configuring Enterprise Manager for Firewalls
Â
Introduction
This document is a guide to deploying an Oracle Management Agent to a Windows host, using Oracle Enterprise Manager Cloud Control 12c (EM12c) Release 5.
From EM12c Release 4 onwards, Oracle Management Agents can now be deployed on Windows hosts using PsExec from another Windows server, which acts as a staging host.
Â
Windows staging server setup
Download the PsExec utility onto the Microsoft Windows staging host server from the following URL:
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
export OMS_HOME=/u01/app/oracle/middleware/em12cr5/oms
$OMS_HOME/bin/emcli login -username=sysman -password=******
Run the following command from the OMS host to obtain the list of platforms for which the Management Agent software is downloaded and applied:
$OMS_HOME/bin/emcli get_supported_platforms
Create a zip image for the Management Agent software:
export ZIP_LOC=/usr/bin/zip
$OMS_HOME/bin/emcli get_agentimage -destination=/swlib/win_x64_agent -platform=”Microsoft Windows x64 (64-bit)” -version=12.1.0.5.0
=== Partition Detail ===
Space free : 6 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2015-06-25_11-09-33-AM.log
Downloading /swlib/win_x64_agent/12.1.0.5.0_AgentCore_233.zip
File saved as /swlib/win_x64_agent/12.1.0.5.0_AgentCore_233.zip
Downloading /swlib/win_x64_agent/12.1.0.5.0_PluginsOneoffs_233.zip
File saved as /swlib/win_x64_agent/12.1.0.5.0_PluginsOneoffs_233.zip
Downloading /swlib/win_x64_agent/unzip
File saved as /swlib/win_x64_agent/unzip
Agent Image Download completed successfully.
Transfer the following file to the Windows staging server:
/swlib/win_x64_agent/12.1.0.5.0_AgentCore_233.zip
Download the agentDeployPsExec.bat script onto the staging host, from the following location:
$OMS_HOME/sysman/prov/agentpush/scripts/agentDeployPsExec.bat
Create a response file to specify the Management Agent install inputs.
Create agent response file (agent.rsp) accordingly:
# Oracle Management Agent response file
# http://docs.oracle.com/cd/E24628_01/install.121/e22624/appdx_install_agent_psexec.htm#CIHCHIGA
HOST_NAMES=.company.co.uk
USER_NAME=\GCUser
PASSWORD=******
PSEXEC_DIR=E:\EM12c\staging\PSTools
AGENT_IMAGE_PATH=E:\EM12c\staging\core\12.1.0.5.0_AgentCore_233.zip
AGENT_BASE_DIR=E:\app\oracle\agent12c
AGENT_REGISTRATION_PASSWORD=******
EM_UPLOAD_PORT=4903
OMS_HOST=
REMOTE_SYS_DIR=C:\Windows
LOG_LOC=E:\EM12c\staging\logs
ADDITIONAL_PARAMETERS=AGENT_PORT=3872:b_startAgent=true:s_agentHomeName=agent12cR5
Setup EMUSER account
Add the \GCUser account to the local Administrators group.
Modify Firewall properties
The windows firewall settings need to be modified to allow communication between the agent and the oms host.
Start the firewall gui.
Start -> Administrative Tools -> Windows Firewall with Advanced configuration
Modify the settings as shown in the following screenshots.
Right click on “Inbound Rules†and select “New Ruleâ€
Â
Â
Enter the port numbers shown
Â
Â
Select
Â
Â
Â
Enter the rule name as “Oracle management Server to Oracle Management agentâ€
Â
Â
Right click on “Outbound Rules†and select “New Ruleâ€
Â
Â
Modify SQLNET.ORA
For security purposes the sqlnet.ora file in use on the agent host may have an entry such as:
TCP.INVITED_NODES = ( node1, node2, node3 )
This entry is used to restrict oracle tcp access to the host; if this entry exists then the grid control host must be added to the invited nodes list; e.g.
TCP.INVITED_NODES = ( node1, node2, node3, OEM )
Â
Normal 0 false false false EN-GB JA X-NONE
Agent deployment
1. Logon onto the Windows EM12c staging server.
2. Update the following response file to include the target host name, credentials, and an appropriate installation directory for the agent (highlighted in yellow below):
E:\EM12c\staging\core\agent.rsp
Example contents:
HOST_NAMES=
USER_NAME=\GCUser
PASSWORD=password123
PSEXEC_DIR=E:\EM12c\staging\PSTools
AGENT_IMAGE_PATH=E:\EM12c\staging\core\12.1.0.5.0_AgentCore_233.zip
AGENT_BASE_DIR=E:\app\oracle\agent12c
AGENT_REGISTRATION_PASSWORD=password123
EM_UPLOAD_PORT=4903
OMS_HOST=
REMOTE_SYS_DIR=C:\Windows
LOG_LOC=E:\EM12c\staging\logs
ADDITIONAL_PARAMETERS=AGENT_PORT=3872:b_startAgent=true:s_agentHomeName=agent12cR5
3. Open a Command Prompt Window (as Administrator) and change directory to the PsExec tools folder:
cd /d E:\EM12c\staging\PSTools
4. Test connectivity to the target server using PsExec with the \GCUser account:
psexec.exe \\ -u \GCUser -p ****** -d -c E:\EM12c\staging\PSTools\\test.bat
PsExec v2.11 – Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals – www.sysinternals.com
test.bat started on with process ID 5068.
E:\EM12c\staging\PSTools>
5. Assuming the test completes without any issues, run the following command from the staging host to install the agent on the selected Windows target host:
E:\EM12c\staging\PSTools>E:\EM12c\staging\core\agentDeployPsExec.bat PROPERTIES_FILE=E:\EM12c\staging\core\agent.rsp
E:\EM12c\staging\PSTools>echo off
===================================================================
Agent deployment started on host :
Creating installation base directory …
Copying unzip to the target host …
Copying agent software to the target host …
Extracting agent software …
Installing agent ….
Performing clean up …
Agent deployment completed successfully on host :
E:\EM12c\staging\PSTools>
Yo You should see a message saying the deployment completed successfully.
T The agent target is now ready to be configured in Oracle Enterprise Manager.
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);}
Normal 0 false false false false EN-GB JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:”Table Normal”; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:””; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:”Cambria”,serif; mso-fareast-language:EN-US;}
Known issues
Passwords with special characters
Special characters in the \GCUser password (or equivalent account) can lead to PsExec command failures. Should this occur, PsExec will produce an error like the one below:
The handle is invalid.
Connecting to …
Couldn’t access :
Account hasn’t been added to the local Administrators group on the target host
If the \GCUser account doesn’t have local administrator rights on the target server, you will get an access denied error when trying to connect via PsExec:
Couldn’t access
Access is denied.
Â
Â
Discussion ¬