1. Stop the database using Sql*plus
[email protected] oracle]$ sqlplus log
sql> connect/as sysdba
sql> shutdown [immediate]
sql> Exit
2. Stop Listener
[[email protected] oracle]$ Lsnrctl stop
3. Stop the HTTP service
[[Email protected]/root]# service httpd stop
4. Use Su or log back in to root (if you want to reinstall the Oracle user, save the environment variable)
5. Remove the installation directory
[email protected]/root]# rm-rf/u01/oracle/
[email protected]/root]# rm-rf/u01/orainventory/
6. Delete the file under/usr/bin
[email protected]/root]# Rm/usr/local/bin/dbhome
[email protected]/root]# rm/usr/local/bin/oraenv
[email protected]/root]# rm/usr/local/bin/coraenv
7. Delete the/etc/oratab
[email protected]/root]# Rm/etc/oratab
8. Delete the/etc/orainst.loc
[email protected]/root]# Rm/etc/orainst.loc
9. Remove the Oracle User (to reinstall, do not delete)
[email protected]/root]# Userdel–r Oracle
10. Delete the user group (to reinstall it, you can not delete it)
[email protected]/root]# Groupdel oinstall
[[email protected]/root]# Groupdel dba
11. Remove the Startup service
[email protected]/root]# chkconfig--del Dbora
after the reboot, the Oracle database under your Linux system has been completely removed!!!
the above is the Centos5.4+oracle 11g environment.
If you want to install again, it's best to do some backup work first.
includes the user's logon script, the database automatically starts the closed script, and the listener automatically starts the script.
if possible, even the script that created the database is saved.