Uninstall oracle 11g linux environment

1.停库
[oracle@testdb ~]$ sqlplus / as sysdba
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

2.停监听
[oracle@testdb ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-DEC-2016 14:44:52
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb)(PORT=1521)))
The command completed successfully

3. Stop the HTTP service
[root @ testdb ~] # Service httpd STOP
Stopping httpd: [the OK]

4. su root again or to log on to (if reinstalling oracle user may remain)

5. Remove the installation directory
[the testdb the root @ ~] # RM -rf / u01 / App / Oracle /
[the testdb the root @ ~] # RM -rf / u01 / App / the oraInventory /

6.删除/usr/bin下文件
[root@testdb ~]# rm -rf /usr/local/bin/dbhome
[root@testdb ~]# rm -rf /usr/local/bin/oraenv
[root@testdb ~]# rm -rf /usr/local/bin/coraenv

7. Delete the / etc / the oratab
[root @ testdb ~] # RM / etc / the oratab

8. Delete /etc/oraInst.loc
[root @ testdb ~] # RM /etc/oraInst.loc

9. Delete the oracle user (To reinstall, you can not delete)
[root @ testdb ~] # userdel -r oracle

10. Delete User Group (To reinstall, may not be deleted)
[the testdb the root @ ~] # groupdel the oinstall
[the testdb the root @ ~] # groupdel DBA

11. Delete start the service
[root @ testdb ~] # chkconfig
after the restart, Oracle database has been completely removed at this point Linux systems

Guess you like

Origin www.cnblogs.com/ritchy/p/11230329.html