如何用靜默方式刪除oracle軟體

space6212發表於2019-02-15

本文主要介紹在linux下如何用靜默方式解除安裝oracle軟體。
在linux下解除安裝oracle軟體比較簡單,可以簡單的把相關目錄刪除掉,然後清理一下/etc下oracle相關的檔案就可以。
但還是有必要了解一下如何透過工具來解除安裝。


1、首先配置響應檔案

如下是一個響應檔案例子:
[root@suk1 response]# more uninstall.rsp
#-------------------------------------------
#響應檔案的版本
RESPONSEFILE_VERSION=2.2.1.0.0
#oracle使用者組
UNIX_GROUP_NAME=oinstall

#ORACLE_HOME的完整路徑
ORACLE_HOME="/opt/oracle/product/10g"

#ORACLE_HOME名稱
ORACLE_HOME_NAME="OraDb10g_home1"

DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}

#設定dba組名
s_nameForDBAGrp=oinstall

#設定oper組名
s_nameForOPERGrp=oinstal
#--------------------------------------------

以上引數根據實際情況休修改。

2、在oracle使用者下解除安裝
[oracle@suk1 database]$ ./runInstaller -silent -deinstall -removeallfiles -removeAllPatches "REMOVE_HOMES={$ORACLE_HOME}" -responseFile /soft/database/response/uninstall.rsp
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-11-06_06-07-45PM. Please wait ...[oracle@suk1 database]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

Starting deinstall


Deinstall in progress (Tue Nov 06 18:07:58 CST 2007)
WARNING:The directory: /opt/oracle/product/10g 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 "Oracle Database Configuration Assistant" succeeded
Configuration assistant "Oracle Net Configuration Assistant - Deinstall Script" failed
.......................................................................................... 100% Done.

Deinstall successful

End of install phases.(Tue Nov 06 18:08:50 CST 2007)
End of deinstallations
Please check '/opt/oracle/oraInventory/logs/silentInstall2007-11-06_06-07-45PM.log' for more details.

命令執行完後,oracle會把oracle_home和/usr/bin下的相關檔案都刪除。

步驟很簡單,這裡也簡單記錄一下。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/231499/viewspace-63880/,如需轉載,請註明出處,否則將追究法律責任。

相關文章