ITPub博客

【GC】Grid Control Agent完整删除方法

原创 Linux操作系统 作者:secooler 时间:2011-11-15 22:31:22 0 删除 编辑
  当需要删除Grid Control Agent的时候,往往会因为删除不完整导致无法重新顺利部署Agent的问题。
  这里给出Grid Control Agent的完整删除方法。供大家参考。

1.确认Agent当前状态

[oracle@secdb1 ~]$ cd /u01/app/oracle/agent/agent10g/bin
[oracle@secdb1 bin]$ ./emctl status agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.1.0
OMS Version       : 10.2.0.1.0
Protocol Version  : 10.2.0.0.0
Agent Home        : /u01/app/oracle/agent/agent10g
Agent binaries    : /u01/app/oracle/agent/agent10g
Agent Process ID  : 7413
Parent Process ID : 7395
Agent URL         : https://secdb1.localdomain:3872/emd/main/
Repository URL    : https://secdb2.localdomain:1159/em/upload
Started at        : 2011-11-10 11:13:49
Started by user   : oracle
Last Reload       : 2011-11-11 00:37:06
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :      134
Size of XML files pending upload(MB)         :     6.09
Available disk space on upload filesystem    :    76.00%
Last successful heartbeat to OMS             : 2011-11-11 02:15:07
---------------------------------------------------------------
Agent is Running and Ready

2.停掉Agent

[oracle@secdb1 bin]$ ./emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.

3.删除Agent对应的软件

此处使用静默方式完成Agent软件删除。
[oracle@secdb1 bin]$ cd /u01/app/oracle/agent/agent10g/oui/bin
[oracle@secdb1 bin]$ pwd
/u01/app/oracle/agent/agent10g/oui/bin
[oracle@secdb1 bin]$ ./runInstaller -silent -deinstall -removeallfiles -removeAllPatches REMOVE_HOMES="{/u01/app/oracle/agent/agent10g}"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-11-11_02-20-26AM. Please wait ...[oracle@secdb1 bin]$ Oracle Universal Installer, Version 10.2.0.5.0 Production
Copyright (C) 1999, 2009, Oracle. All rights reserved.

Starting deinstall


Deinstall in progress (Friday, November 11, 2011 2:20:43 AM CST)
WARNING:The directory: /u01/app/oracle/agent/agent10g will be deleted after deinstall.
Click on "Yes" to continue.
Click on "No" to perform. deinstall without deleting the directory.
Click on "Cancel" to go back to "Inventory Dialog".
Configuration assistant "Agent Deinstall Assistant" succeeded
................................................................ 100% Done.

Deinstall successful

End of install phases.(Friday, November 11, 2011 2:22:01 AM CST)
End of deinstallations
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2011-11-11_02-20-26AM.log' for more details.

4.删除inventory.xml文件中有关Agent的信息
inventory.xml文件存放在oraInventory目录下的ContentsXML目录中。
1)确认oraInventory文件夹存放位置的方法
/etc/oraInst.loc文件中记录了oraInventory文件夹的位置
[oracle@secdb1 agent]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

2)删除inventory.xml文件中中NAME是agent10g的内容
[oracle@secdb1 ~]$ vi /u01/app/oracle/oraInventory/ContentsXML/inventory.xml

<!-- Copyright (c) 2009 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->


   10.2.0.5.0
   2.1.0.6.0






~
~
5.删除agent目录
[oracle@secdb1 oracle]$ rm -rf $ORACLE_BASE/agent?

6.小结
  按照上述步骤便可以顺利地删除Grid Control Agent软件,以便重新部署安装Agent。
  重点关注上述步骤中的第4步骤,这个步骤是最容易遗忘的地方,切记。

Good luck.

secooler
11.11.15

-- The End --

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-710722/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE 总监,OCM联盟(ocmu.org)创始人,恩墨学院(enmoedu.com)创始人,ITPUB Oracle专题深入讨论版版主,资深Oracle数据库专家,北京大学理学硕士,获Oracle OCM 10g 11g认证,ACOUG核心成员,DATAGURU专家团成员,Blogger。Good luck.

注册时间:2008-03-16

  • 博文量
    797
  • 访问量
    7883373