完整刪除Grid Control Agent

Reference:http://blog.itpub.net/519536/viewspace-710722

  • 確認Agent當前狀態

[oracle@ocmbase ~]$ $AGENT_HOME/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/agent10g
Agent binaries    : /u01/app/oracle/agent10g
Agent Process ID  : 7662
Parent Process ID : 7638
Agent URL         : https://ocmbase.localdomain:3872/emd/main/
Repository URL    : https://ocmgc.localdomain:1159/em/upload
Started at        : 2014-10-01 11:56:09
Started by user   : oracle
Last Reload       : 2014-10-01 12:09:07
Last successful upload                       : 2014-10-02 21:44:15
Total Megabytes of XML files uploaded so far :    38.58
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    61.95%
Last successful heartbeat to OMS             : 2014-10-02 21:45:42
---------------------------------------------------------------
Agent is Running and Ready


  • 停掉Agent

[oracle@ocmbase ~]$ $AGENT_HOME/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.

  • 刪除Agent對應的軟件:使用靜默方式完成Agent軟件刪除。

[oracle@ocmbase ~]$ cd $ORACLE_BASE
[oracle@ocmbase ~]$ ./agent10g/oui/bin/runInstaller -silent -deinstall -removeallfiles -removeAllPatches REMOVE_HOMES="{/u01/app/oracle/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/OraInstall2014-10-19_09-25-38AM. Please wait ...[oracle@ocmbase oracle]$ Oracle Universal Installer, Version 10.2.0.5.0 Production
Copyright (C) 1999, 2009, Oracle. All rights reserved.

Starting deinstall


Deinstall in progress (Sunday, October 19, 2014 9:25:42 AM CST)
WARNING:The directory: /u01/app/oracle/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.(Sunday, October 19, 2014 9:25:59 AM CST)
End of deinstallations
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2014-10-19_09-25-38AM.log' for more details.

  • 刪除inventory.xml文件中有關Agent的信息
  • inventory.xml文件存放在oraInventory目錄下的ContentsXML目錄中
  1. 確認oraInventory文件夾存放位置的方法:/etc/oraInst.loc文件中記錄了oraInventory文件夾的位置
  2. 刪除inventory.xml文件中<HOME_LIST>中NAME是agent10g的內容

[oracle@ocmbase oracle]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

[oracle@ocmbase oracle]$ vi /u01/app/oracle/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2009 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.5.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb10g_home1" LOC="/u01/app/oracle/product/10.2.0" TYPE="O" IDX="1"/>
<HOME NAME="agent10g" LOC="/u01/app/oracle/agent10g" TYPE="O" IDX="2" REMOVED="T"/>
</HOME_LIST>
</INVENTORY>

  • 刪除agent目錄

[oracle@ocmbase oracle]$ rm -rf $ORACLE_BASE/agent10g

  • 小結

  按照上述步驟便可以順利地刪除Grid Control Agent軟件,以便重新部署安裝Agent。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章