oracle卸载步骤教程 oracle彻底卸载并重装

写在前面

之前写过一篇在CentOS 7/8上安装Oracle的文章,按照我写的文章安装成功了,但是卸载Oracle时出现了问题 。今天,我就整理一篇手动安装和卸载Oracle的文章吧 。全文为实战型内容,全程干货 。
如果文章对你有所帮助,请不要吝惜你的点赞、在看、留言和转发,你的支持是我持续创作的最大动力!
环境准备1.CentOS7 / CentOS8 64位最小化安装的虚拟机环境(这里的安装步骤,我就直接省略了,大家自行安装虚拟机环境)
2.Oracle 11gR2 64位 Linux版安装包(关注【冰河技术】微信公众号,回复“oracle”关键字即可获取Oracle数据库安装包下载链接) 。
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
安装过程1.关闭防火墙操作用户:root
systemctlstopfirewalld.servicesystemctldisablefirewalld.service2.安装依赖包操作用户为:root 。
执行如下命令安装依赖包 。
yuminstall-yautomakeautotools-devbinutilsbzip2elfutilsexpatgawkgccgcc-multilibg++-multiliblib32ncurses5lib32z1kshlesslib32z1libaio1libaio-devlibc6-devlibc6-dev-i386libc6-i386libelf-devlibltdl-devlibodbcinstq4-1libodbcinstq4-1:i386libpth-devlibpthread-stubs0-devlibstdc++5makeopenssh-serverrlwraprpmsysstatunixodbcunixodbc-devunzipx11-utilszlibcunzipcifs-utilslibXext.x86_64glibc.i6863.创建oracle用户操作用户为:root
groupadd-g502oinstallgroupadd-g503dbagroupadd-g504opergroupadd-g505asmadminuseradd-u502-goinstall-Goinstall,dba,asmadmin,oper-s/bin/bash-moraclepasswdoracle上述命令执行完毕后,为oracle用户设置密码,例如,我这里设置的密码为oracle
4.解压Oracle数据库安装包操作用户:oracle操作目录:/home/oracle
将Oracle 11gR2安装文件上传(可以使用sftp上传)到该操作目录下面,然后顺序解压安装文件到该目录 。
unziplinux.x64_11gR2_database_1of2.zipunziplinux.x64_11gR2_database_2of2.zip5.修改操作系统配置操作用户:root操作文件:/etc/security/limits.conf
vim/etc/security/limits.conf在文件的末尾添加如下配置项 。
oraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536oraclesoftstack102406.创建Oracle安装目录操作用户:oracle
【oracle卸载步骤教程 oracle彻底卸载并重装】mkdir~/tools/oracle11g7.修改环境变量操作用户:oracle操作目录:/home/oracle
vim~/.bash_profile在文件末尾添加如下配置项
exportORACLE_BASE=/home/oracle/tools/oracle11gexportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1exportORACLE_SID=orclexportORACLE_UNQNAME=orclexportNLS_LANG=.AL32UTF8exportPATH=${PATH}:${ORACLE_HOME}/bin/:$ORACLE_HOME/lib64使得环境变量生效 。
source~/.bash_profile8.修改Oracle配置文件操作用户:oracle操作目录:/home/oracle
复制文件模板
cp/home/oracle/database/response/db_install.rsp.注意:复制命令的最后一个 . 不能省略,表示将db_install.rsp文件从
/home/oracle/database/response目录拷贝到当前目录 。
对db_install.rsp文件进行编辑 。
vimdb_install.rsp需要修改的配置项如下所示,这里,我将修改后的配置项列举出来 。
oracle.install.option=INSTALL_DB_AND_CONFIGORACLE_HOSTNAME=localhost#实际上可以修改成你自己的主机名或者域名(IP)UNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/home/oracle/tools/oraInventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/home/oracle/tools/oracle11g/product/11.2.0/dbhome_1ORACLE_BASE=/home/oracle/tools/oracle11goracle.install.db.InstallEdition=EEoracle.install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=operoracle.install.db.config.starterdb.type=GENERAL_PURPOSEoracle.install.db.config.starterdb.globalDBName=orcloracle.install.db.config.starterdb.SID=orcloracle.install.db.config.starterdb.characterSet=AL32UTF8oracle.install.db.config.starterdb.memoryOption=trueoracle.install.db.config.starterdb.memoryLimit=1024oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.password.ALL=Oracle#123456oracle.install.db.config.starterdb.control=DB_CONTROLoracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=falseoracle.install.db.config.starterdb.dbcontrol.emailAddress=test@qq.com#可以填写你自己的邮箱地址oracle.install.db.config.starterdb.automatedBackup.enable=falseoracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGEoracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/home/oracle/tools/oracle11g/oradataoracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/home/oracle/tools/oracle11g/fast_recovery_areaoracle.install.db.config.starterdb.automatedBackup.enable=falseDECLINE_SECURITY_UPDATES=true

推荐阅读