CentOS7.5上卸载Oracle19c

1.停库
需要切换到oracle用户
[root@testdb ~]# su - oracle
[oracle@testdb ~]$ sqlplus / as sysdba
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

CentOS7.5上卸载Oracle19c

 

 

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

CentOS7.5上卸载Oracle19c

 

 

3.停HTTP服务
这一步退出到root用户
[oracle@testdb ~]$ exit
[root@testdb ~]#
[root@testdb ~]# service httpd stop
Stopping httpd: [ OK ]

CentOS7.5上卸载Oracle19c

 

 

4.删除安装目录
[root@testdb ~]# rm -rf /u01/app/oracle/
[root@testdb ~]# rm -rf /u01/app/oraInventory/

CentOS7.5上卸载Oracle19c

 

 

5.删除/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

CentOS7.5上卸载Oracle19c

 

 

6.删除/etc/oratab和/etc/oraInst.loc
[root@testdb ~]# rm /etc/oratab
[root@testdb ~]# rm /etc/oraInst.loc

CentOS7.5上卸载Oracle19c

 

 CentOS7.5上卸载Oracle19c

 

 

7.删除oracle用户、用户组(若要重新安装,可以不删除)
[root@testdb ~]# userdel -r oracle

[root@testdb ~]# groupdel oinstall
[root@testdb ~]# groupdel dba

CentOS7.5上卸载Oracle19c

 

 

8.删除启动服务
[root@testdb ~]# chkconfig --del dbora

CentOS7.5上卸载Oracle19c

 

 

到此为止重启后,Linux系统下Oracle数据库已完全删除。

上一篇:java计算当前月的第几周,及周的起止日期


下一篇:背包问题