在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下的相关文件都删除。
步骤很简单,这里也简单记录一下。