The process of uninstalling oracle 11g in the linux environment
- 2021-06-28 14:46:17
- OfStack
1. Shutdown
[oracle@testdb ~]$ sqlplus / as sysdba
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
2. Interception
[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 HTTP service
[root@testdb ~]# service httpd stop
Stopping httpd: [ OK ]
4. Use su or log back in to root (oracle users can be retained if reinstalled)
5. Delete installation directory
[root@testdb ~]# rm -rf /u01/app/oracle/
[root@testdb ~]# rm -rf /u01/app/oraInventory/
6. Delete files under/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/etc/oratab
[root@testdb ~]# rm /etc/oratab
8. Delete/etc/oraInst.loc
[root@testdb ~]# rm /etc/oraInst.loc
9. Delete the oracle user (you can not delete it if you want to reinstall it)
[root@testdb ~]# userdel -r oracle
10. Delete user groups (you can not delete them if you want to reinstall them)
[root@testdb ~]# groupdel oinstall
[root@testdb ~]# groupdel dba
11. Delete Startup Services
[root@testdb ~]# chkconfig
Up to this point, the Oracle database under the Linux system has been completely deleted
summary