1、进入卸载脚本所在目录
[weblogic@linuxserver
~]$ pwd
/home/weblogic
[weblogic@linuxserver
~]$ cd Oracle/Middleware/wlserver_10.3/uninstall/
[weblogic@linuxserver
uninstall]$ ls
uninstall.sh wls_uninstall.xml
2、运行卸载脚本
[weblogic@linuxserver
uninstall]$ ./uninstall.sh
/home/weblogic/Oracle/Middleware/utils/uninstall/uninstall.sh:
line 11: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/bin/java: No such file
or directory
提示不存在相应版本的java,查看当前环境变量配置文件,与卸载脚本中的java版本不一致。
[weblogic@linuxserver
uninstall]$ cat /home/weblogic/.bash_profile
# .bash_profile
# Get the aliases
and functions
if [ -f ~/.bashrc
]; then
. ~/.bashrc
fi
# User specific
environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
JAVA_HOME=/usr/java/jdk1.8.0_45
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME
CLASSPATH PATH
[weblogic@linuxserver
uninstall]$ cat /home/weblogic/Oracle/Middleware/utils/uninstall/uninstall.sh
#!/bin/sh
# This script
assumes WL_HOME is set to the product directory which is the
# target of the
uninstall before this script it called.
# Set JAVA Home
JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64"
# Set BEA Home
BEAHOME="/home/weblogic/Oracle/Middleware"
"${JAVA_HOME}/bin/java"
${JAVA_VM} -Xmx256m -Djava.library.path="${BEAHOME}/utils/uninstall"
-Dhome.dir="${BEAHOME}" -Dinstall.dir="${WL_HOME}" -jar
"${BEAHOME}/utils/uninstall/uninstall.jar" $*
exit $?
修改卸载脚本中的java,与当前环境一致。
[weblogic@linuxserver
uninstall]$ vim /home/weblogic/Oracle/Middleware/utils/uninstall/uninstall.sh
重新运行卸载脚本
[weblogic@linuxserver
uninstall]$ ./uninstall.sh
Unable to
instantiate GUI, defaulting to console mode.
Java HotSpot(TM)
64-Bit Server VM warning: You have loaded library
/home/weblogic/Oracle/Middleware/utils/uninstall/libjni.so which might have disabled
stack guard. The VM will try to fix the stack guard now.
It's highly
recommended that you fix the library with 'execstack -c ', or
link it with '-z noexecstack'.
Welcome:
Welcome to the
WebLogic Platform 10.3.6.0 uninstaller. If
you wish to
proceed with the uninstallation type Next,
otherwise, please
type Exit to cancel.
Enter
[Exit][Next]> next
Choose Products
and Components to uninstall:
--------------------------------------------
Check the
components you want to uninstall.
Release 10.3.6.0
|_____WebLogic Server [1] x
|
|_____Core Application Server [1.1] x
|
|_____Administration Console [1.2] x
|
|_____Configuration Wizard and Upgrade Framework [1.3] x
|
|_____Web 2.0 HTTP Pub-Sub Server [1.4] x
|
|_____WebLogic SCA [1.5] x
|
|_____WebLogic JDBC Drivers [1.6] x
|
|_____Third Party JDBC Drivers [1.7] x
|
|_____WebLogic Server Clients [1.8] x
|
|_____WebLogic Web Server Plugins [1.9] x
|
|_____UDDI and Xquery Support [1.10] x
|
|_____Evaluation Database [1.11] x
|_____Oracle Coherence [2] x
|_____Coherence Product Files [2.1] x
Enter number
exactly as it appears in brackets to toggle selection OR [Exit][Next]> next
Setting Up
Removing Files
Removing registry
entries
Uninstall
Completed Successfully!
Uninstallation
Complete
Uninstallation of
selected components has completed successfully.
Press [Enter] to
continue
最后删除安装目录。
[weblogic@linuxserver
uninstall]$ cd
[weblogic@linuxserver
~]$ rm -fr Oracle/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28536251/viewspace-1714213/,如需转载,请注明出处,否则将追究法律责任。