设为首页 收藏本站
查看: 760|回复: 0

[经验分享] Example of deploying a 12c Cloud Control Agent on a Windows (Doc ID 1923499.1)

[复制链接]

尚未签到

发表于 2015-12-16 08:54:24 | 显示全部楼层 |阅读模式
Example of deploying a 12c Cloud Control Agent on a Windows machine using the PsExec method from a Windows Staging Server when the OMS is on Unix (Doc ID 1923499.1)
http://onexin.iyunv.com/source/plugin/onexin_bigdata/https://support.oracle.com/epmos/ui/images/quicklink_smlarrowdown_enabled.gifTo Bottomhttp://onexin.iyunv.com/source/plugin/onexin_bigdata/https://support.oracle.com/epmos/adf/images/t.gif





http://onexin.iyunv.com/source/plugin/onexin_bigdata/https://support.oracle.com/epmos/adf/images/t.gif

APPLIES TO:
Enterprise Manager Base Platform - Version 12.1.0.3.0 to 12.1.0.4.0 [Release 12.1]
Information in this document applies to any platform.
GOAL
  To show an example of how to use the PsExec method to deploy a 12.1.0.3 Cloud Control agent to a Windows machine when the OMS is on unix.
SOLUTION
Introduction to Agent deploy using PsExec
  Deploying an agent using the PsExec method requires a 'staging' server. This 'staging server' is just a windows machine which hosts the agent software binaries and the install scripts and will not take up a large amount of resources. If the OMS is on windows, it would make sense for the 'staging server' to be the same machine as the OMS machine. However, If the OMS is on unix, then a separate windows machine is needed.  One of the advantages of using PsExec is that it can be used to deploy multiple agents (and does not require cygwin).

Note: This should *not* be the same machine as where you want to actually install the agent. This is because installing using PsExec involves copying the binaries across from the 'staging' machine to the intended agent machines. It would not make sense to use psexec to install an agent on the same machine as the staging server.  Therefore if the requirement is just to install one agent on one machine (without using cygwin), then just use a simple silent install method such asnote:1918878.1 "Example of Installing the 12c Agent on Windows Using the The AgentPull Script (AgentPull.bat)".   Notice that the method used to install/deploy the agent does not affect the subsequent functionality of the agent in any way.Instructions
  1) On the windows machine nominated to be the 'staging' server, download and extract pstools from the sysinternals Microsoft page:
  http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
  Extract into a directory to hold the pstool suite - eg.
  c:\temp\pstools
  During this article, this machine will be known as the 'staging server'
  2) Ensure that this 'windows staging machine' can ping the remote machine where the agent will be deployed.  Also ensure that this machine can resolve its own ipaddress correctly (not to a localhost address or an ipv6 style address)
  3) On the 'staging server', go to control panel/system/advanced system settings/click on "environmental variables", under 'system variables'
  edit path and add:
  c:\temp\pstools;
  to the beginning of the path
  4) Launch a fresh windows command prompt as 'administrator', and type:
  psexec
  at the command prompt.  Check that the psexec banner is displayed and agree to the license terms.
  5) It is now necessary to obtain the agent software and put it on the staging server.  The agent software is obtained from the OMS using Emcli.  Emcli is automatically installed into the $ORACLE_HOME of the OMS.  (Alternatively EMCLI  can be downloaded and run from the 'staging server' machine itself).  In this example, the default Emcli (from the unix OMS home) will be used.
  Connect to the machine where the OMS is:
  If the OMS is on unix, type "which zip", and export ZIP_LOC to the location of zip. For example:

which zip
/usr/bin/zip
export ZIP_LOC=/usr/bin/zip  6) Still on the OMS machine, set ORACLE_HOME to the home of the OMS, and log into emcli
  emcli login -username=sysman -password=oracle12
  7) Run the following emcli command to get a list of the agent software available to be deployed for each platform:

  emcli get_supported_platforms
  -----------------------------------------------
Version = 12.1.0.3.0
Platform = Linux x86
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Linux x86-64
-----------------------------------------------
Version = 12.1.0.2.0
Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------
Version = 12.1.0.2.0
Platform = Microsoft Windows (32-bit)
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Oracle Solaris on x86-64 (64-bit)
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Microsoft Windows (32-bit)
-----------------------------------------------
Version = 12.1.0.3.0
Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------
Platforms list displayed successfully.
  In this example, there are numerous platforms available, but if this is a new install of the OMS by default only the platform of the OMS will be available. Make sure that the right Windows platform (32 or 64 bit) is available (for the machine where the agent needs to be deployed to)

  Tip: to find out whether the windows system is 64 or 32 bit:
  start/control panel/system
under the "system" section
check "system type"
  If the relevant Windows platform (32 or 64 bit) is not listed, it will need to be downloaded via self update.

  Tip: To download from self update
  setup/Extensibility/Self Update
click on "Agent Software"
Software which shows as "Applied" should have been returned by the "showPlatforms" command above.
Software which has not yet been downloaded to the OMS should show as "Available"
  Highlight the platform which is needed (eg. Microsoft Windows (64 bit).) Note that listed here, are different versions of the agent. Make sure that the latest one is selected.
Click on "Download" and select "immediately", the status should change to "Download in Progress". It can take over 10 minutes to download.
When the status changes to "downloaded", highlight it and click on "apply"
The status will now change to "Available".  Now repeat the emcli get_supported_platforms command.
  8) Obtain the agent image.  Use the following command:
  emcli get_agentimage -destination= -platform= -version=
  for example:

  [oracle@machine1 tmp]$ emcli get_agentimage -destination=/tmp/winAgent12103 -platform="Microsoft Windows x64 (64-bit)" -version=12.1.0.3.0
  === Partition Detail ===
Space free : 217 GB
Space required : 1 GB
Check the logs at /oracle/12c/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2014-08-29_12-14-35-PM.log
Downloading /tmp/winAgent12103/12.1.0.3.0_AgentCore_233.zip
File saved as /tmp/winAgent12103/12.1.0.3.0_AgentCore_233.zip
Downloading /tmp/winAgent12103/12.1.0.3.0_PluginsOneoffs_233.zip
File saved as /tmp/winAgent12103/12.1.0.3.0_PluginsOneoffs_233.zip
Downloading /tmp/winAgent12103/unzip
File saved as /tmp/winAgent12103/unzip
Agent Image Download completed successfully.
[oracle@machine1 tmp]$
  This results in the file 12.1.0.3.0_AgentCore_233.zip or 12.1.0.4.0_AgentCore_233.zip being generated (depending on the version of the OMS).  The file will be generated in the destination specified which is /tmp/winAgent12103 in this example.
  9) This extra step is needed for 12.1.0.3 OMS only (if using 12.1.0.4 OMS, go to step 10)
  A) Notice that if the files are viewed which make up the resulting zip file:
  12.1.0.3.0_AgentCore_233.zip contains:
  tmp
agent.rsp
agentcoreimage.zip
agentDeploy.bat
agentimage.properties
unzip.exe
  However, in the later release, 12.1.0.4.0_AgentCore_233.zip contains:
  unizp.exe
agentDeploy.bat
agentimage.properties
agent.rsp
agentcoreimage.zip
12.1.0.4.0_PluginsOneoffs_233.zip
  which means that _PluginsOneoffs_233.zip is missing for the 12.1.0.3 release.  For 12.1.0.3 the 12.1.0.3.0_PluginsOneoffs_233.zip can be found at:
  $ORACLE_HOME/install/agentImage  for example:

  /oracle/12c/12ccloud/oms/install/agentImage
  -rwxr-xr-x 1 oracle oinstall 6626099 Aug 29 11:37 ./install/agentImage/12.1.0.3.0_PluginsOneoffs_233.zip
  B) Copy or move the following files:
  12.1.0.3.0_PluginsOneoffs_233.zip and
12.1.0.3.0_AgentCore_233.zip
  from the OMS machine to the windows 'staging' machine.  

Note if Emcli was installed on the 'windows staging machine', the files would be downloaded directly to that machine and it would not be necessary to copy across.  In this example EMCLI is launched on the remote Unix OMS machine so it's necessary to copy or move the files  C) It is now necessary to merge the 12.1.0.3.0_PluginsOneoffs_233.zip and 12.1.0.3.0_AgentCore_233.zip into one zip file as follows:
  i) extract 12.1.0.3.0_AgentCore_233.zip to c:\temp\winagent
  ii) copy 12.1.0.3.0_PluginsOneoffs_233.zip to c:\temp\winagent (but don't extract just copy so that it remains a zip file)
  The directory c:\temp\winagent should look like this:

08/29/2014 06:56 PM  .
08/29/2014 06:56 PM  ..
08/29/2014 06:51 PM 6,626,099 12.1.0.3.0_PluginsOneoffs_233.zip
06/22/2013 09:46 PM 3,839 agent.rsp
06/22/2013 09:46 PM 257,743,299 agentcoreimage.zip
06/22/2013 09:46 PM 8,768 agentDeploy.bat
06/22/2013 09:45 PM 206 agentimage.properties
06/22/2013 09:46 PM 167,936 unzip.exe
6 File(s) 264,550,147 bytes
2 Dir(s) 33,639,047,168 bytes free  iii) Now zip up this directory so it's called:
  12.1.0.3.0_AgentCore_233.zip
  iv) Copy 12.1.0.3.0_AgentCore_233.zip to c:\temp\agentStage
  10) For 12.1.0.4 it is not necessary to follow step 9.   For 12.1.0.4, copy or move 12.1.0.4.0_AgentCore_233.zip from the OMS machine to the Windows Staging Server and put into c:\temp\agentStage
  11) Use note:1636851.1 to download the agentDeployPSExec.bat script (contact Support to obtain access to this script).  Download this onto the windows staging machine and put it into:
  c:\temp\agentStage
  For example:
  c:\temp\agentStage\agentDeployPSExec.bat
  12) Perform the following test, to check that the Microsoft PsExec command works ok:
  On the 'windows staging' machine, create a file in c:\temp\agentStage called test.bat.

contents of test.bat
================
echo this is a test  Run the following test:
  C:\TEMP\agentStage>psexec.exe \\ -u  -p  -d -c C:\TEMP\agentStage\\test.bat
  For example:

  C:\TEMP\agentStage>psexec.exe \\winpc.uk.oracle.com -u Administrator -p adminTest -d -c C:\TEMP\agentStage\\test.bat
  PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
  
test.bat started on winpc.uk.oracle.com with process ID 18216.
  If this test does not work, then do not continue, but investigate any problems with psexec with Microsoft.
  13) Create a properties/input file which will be used to deploy the agent.  In this example, the properties file is called input1.txt and is created in c:\temp\agentStage

HOST_NAMES=
USER_NAME=
PASSWORD=
AGENT_IMAGE_PATH=
AGENT_BASE_DIR=
OMS_HOST=
EM_UPLOAD_PORT=
AGENT_REGISTRATION_PASSWORD=
PSEXEC_DIR=
REMOTE_SYS_DIR=c:\Windows*  

*The documentation states that REMOTE_SYS_DIR can be set to c:\Windows or C:\Windows\System32.  It should be set to the location of SystemRoot. To find out the location of systemRoot type "set SystemRoot".  For example:

C:\Users\Administrator>set SystemRoot
SystemRoot=C:\Windows  For this example, the contents of c:\temp\agentStage\input1.txt are:

HOST_NAMES=winpc.uk.oracle.com
USER_NAME=Administrator
PASSWORD=adminTest
AGENT_IMAGE_PATH=C:\temp\agentStage\12.1.0.3.0_AgentCore_233.zip
AGENT_BASE_DIR=C:\12ctestagent
OMS_HOST=machine1.uk.oracle.com
EM_UPLOAD_PORT=4901
AGENT_REGISTRATION_PASSWORD=oracle12
PSEXEC_DIR=C:\temp\psTools
REMOTE_SYS_DIR=c:\Windows   Note the following:

  Tip: If unsure about the port of the oms run the following command on the oms machine
  emctl status oms -details
  
  This will give the following output:
  Console Server Host : machine1.uk.oracle.com agentDeployPSExec.bat PROPERTIES_FILE=c:\temp\agentStage\input1.txt
  C:\TEMP\agentStage>echo off
===================================================================
Agent deployment started on host : winpc.uk.oracle.com
  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 : winpc.uk.oracle.com
  18) If there are any problems with the install, check the log file that is generated on the 'staging server' machine in C:\TEMP\agentStage\agentDeployPsExec_.log

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-151790-1-1.html 上篇帖子: windows远程桌面工具 下篇帖子: Windows8硬盘分区导致文件丢失怎么办
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表