Oracle 11.2.0.4 Linux 静默安装及卸载过程

:2022年05月31日 CSDN
分享到:

Oracle安装1.下载Oracle版本:Oracle11g本次提供百度网盘下载,若失效请自行查找资源:百度网盘:https://pan.baidu.com/s/1AOO8BoPc93DHGxO0bXiU4g?pwd=1qaz  提取密码:1qaz总共7个包,其中1、2表...

Oracle安装

1.下载Oracle版本:Oracle11g

本次提供百度网盘下载,若失效请自行查找资源:

百度网盘:https://pan.baidu.com/s/1AOO8BoPc93DHGxO0bXiU4g?pwd=1qaz 
提取密码:1qaz

总共7个包,其中1、2表示Database,  用于安装、升级数据库;

3为grid infrastructure,用来升级RAC。如果要使用Clusterware、ASM、ACFS、ASM动态卷等功能时都需要先安装此包。

4表示客户端(Client);

567不管

2.查看主机名

[root@localhost ~]# hostnamelocalhost.localdomain

3.在/etc/hosts文件内容的最底下添加主机名,已配置此步骤省略

127.0.0.1 localhost192.168.146.134 localhost.localdomain

 4.关闭防火墙,该方法为永久关闭防火墙,

[root@localhost ~]#systemctl stop firewalld.service[root@localhost ~]#systemctl disable firewalld.service[root@localhost ~]#vi /etc/selinux/config设置SELINUX=disabled[root@localhost ~]#setenforce 0

5.安装依赖包

yum install -y automake autotools-dev binutils bzip2 elfutils expat \gawk gcc gcc-multilib g++-multilib lib32ncurses5 lib32z1 \ksh less lib32z1 libaio1 libaio-dev libc6-dev libc6-dev-i386 \libc6-i386 libelf-dev libltdl-dev libodbcinstq4-1 libodbcinstq4-1:i386 \libpth-dev libpthread-stubs0-dev libstdc++5 make openssh-server rlwrap \rpm sysstat unixodbc unixodbc-dev x11-utils zlibc cifs-utils \libXext.x86_64  glibc.i686

6.创建用户、组、目录,显示最后一行则说明创建成功

[root@localhost ~]#groupadd oinstall[root@localhost ~]#groupadd dba[root@localhost ~]#useradd -g oinstall -G dba oracle[root@localhost ~]#passwd oracle[root@localhost ~]#id oracleuid=1000(oracle) gid=1000(oinstall) groups=1000(oinstall),1001(dba)

7.创建软件安装目录

[root@localhost ~]#mkdir -p /opt/oracle //$ORACLE_BASE[root@localhost ~]#mkdir -p /opt/oracle/product/112010/db_1 //$ORACLE_HOME[root@localhost ~]#mkdir /opt/oracle/oradata //存放数据库目录[root@localhost ~]#mkdir /opt/oracle/inventory[root@localhost ~]#mkdir /opt/oracle/flash_recovery_area[root@localhost ~]#mkdir /opt/oracle/fast_recovery_area[root@localhost ~]#chown -R oracle:oinstall /opt/oracle[root@localhost ~]#chmod -R 775 /opt/oracle

8.将oracle使用者加入到sudo群组中

[root@localhost ~]#vi /etc/sudoers输入上面的命令后,打开sudoers文件进行编辑,找到root       ALL=(ALL)       ALLoracle 	   ALL=(ALL)       ALL使用:wq!退出

9.配置系统内核

[root@localhost ~]# vi /etc/sysctl.confkernel.shmall = 2097152kernel.shmmax = 1073741824fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576

10.修改用户限制脚本

[root@localhost ~]# vi /etc/security/limits.conforacle           soft    nproc           2047oracle           hard    nproc           16384oracle           soft    nofile          1024oracle           hard    nofile         65536oracle           soft    stack           10240

11.关联设置

[root@localhost ~]# vi /etc/pam.d/login最后插入session required  /lib64/security/pam_limits.sosession required   pam_limits.so

12.修改/etc/profile

[root@localhost ~]#vi /etc/profile最后插入if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi

$在root用户下,使用命令source profile使环境变量生效

[root@localhost ~]#source /etc/profile

13.修改用户环境变量

[root@localhost ~]#vi /home/oracle/.bash_profile

最后添加

# For Oracleexport  ORACLE_BASE=/opt/oracle;export  ORACLE_HOME=/opt/oracle/product/112010/db_1export  ORACLE_SID=orcl;export  PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libif [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022fi

保存退出后使环境变量生效

[root@localhost ~]#source /home/oracle/.bash_profile

14.正式安装软件

下载:unzip 解压插件yum install -y unzip zip

将文件上传到/opt/oracle目录下

[root@localhost ~]#unzip p13390677_112040_Linux-x86-64_1of7.zip[root@localhost ~]#unzip p13390677_112040_Linux-x86-64_2of7.zip

解压完成后/opt/oracle下会生成database目录

15.修改配置文件

切换用户并将安装文件复制到/opt/oracle路径下

[root@localhost ~]#cd /opt/oracle[root@localhost ~]#su oracle[oracle@localhost ~]#cp /opt/oracle/database/response/db_install.rsp ./

对db_install.rsp文件进行编辑

[root@localhost ~]#vim db_install.rsp

一定要仔细的把参数配置完,仔细!仔细! 

oracle.install.option=INSTALL_DB_AND_CONFIGORACLE_HOSTNAME=localhost #实际上可以修改成你自己的主机名或者域名(IP)UNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/opt/oracle/inventorySELECTED_LANGUAGES=en,zh_CNORACLE_HOME=/opt/oracle/product/112010/db_1ORACLE_BASE=/opt/oracleoracle.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=oracleoracle.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=/opt/oracle/oradataoracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/opt/oracle/fast_recovery_areaoracle.install.db.config.starterdb.automatedBackup.enable=falseDECLINE_SECURITY_UPDATES=true

16.静默安装Oracle 11gR2

操作用户:oracle

操作目录:/opt/oracle/database

cd /opt/oracle/database./runInstaller -silent -ignoreSysPrereqs -responseFile /opt/oracle/db_install.rsp

安装过程到最后会出现如下界面,千万不要按<Enter>或者ctrl+c, 新打开一个连接,将给出的两个脚本文件执行一遍,执行成功后再回到当前页面按<Enter>

The following configuration scripts need to be executed as the "root" user.#!/bin/sh#Root scripts to run/opt/oracle/inventory/orainstRoot.sh/opt/oracle/product/112010/db_1/root.shTo execute the configuration scripts:1. /opt/oracle/inventory/orainstRoot.sh2. /opt/oracle/product/112010/db_1/root.shSuccessfully Setup Software.

17.创建连接用户

操作用户:oracle

sqlplus / as sysdbastartup

能进去说明安装成功了

执行命令后有如下效果说明监听也是正确的

lsnrctl status

也可以修改/opt/oracle/product/112010/db_1/network/admin下的listener.ora 和tnsnames.ora更改监听配置,更改后执行 lsnrctl restart

lsnrctl restart  //重启lsnrctl stop     //关闭lsnrctl start    //启动

手动卸载Oracle

1.停止监听

[oracle@localhost ~]$ lsnrctl stop[oracle@localhost ~]$ lsnrctl status

2.停止数据库

[oracle@localhost ~]$ sqlplus / as sysdbaSQL> shutdown immediate

3.删除安装目录下所有数据

[root@localhost app]# rm -rf /opt/oracle/*

4.删除临时目录/tmp

[root@localhost tmp]# rm -rf /tmp/*

5.删除Oracle的配置文件

[root@localhost tmp]# rm -f /etc/ora*

6.删除oracle产生命令

[root@localhost tmp]# rm -f /usr/local/bin/*

7.其他的文件

[root@localhost .oracle]# rm -rf /usr/tmp/.oracle/

8.删除用户和组

[root@localhost tmp]# userdel -r oracle[root@localhost tmp]# groupdel dba    [root@localhost tmp]# groupdel oinstall

9.撤销oracle的资源限制文件

[root@localhost tmp]# vi /etc/security/limits.conf

10.内核参数修改恢复

[root@localhost tmp]# vi /etc/sysctl.conf [root@localhost tmp]# sysctl -p
[我要纠错]
文:宋聪乔&发表于江苏
关键词: Oracle 安装 1.下载 Oracle 版本

来源:本文内容搜集或转自各大网络平台,并已注明来源、出处,如果转载侵犯您的版权或非授权发布,请联系小编,我们会及时审核处理。
声明:江苏教育黄页对文中观点保持中立,对所包含内容的准确性、可靠性或者完整性不提供任何明示或暗示的保证,不对文章观点负责,仅作分享之用,文章版权及插图属于原作者。

点个赞
0
踩一脚
0

您在阅读:Oracle 11.2.0.4 Linux 静默安装及卸载过程

Copyright©2013-2024 JSedu114 All Rights Reserved. 江苏教育信息综合发布查询平台保留所有权利

苏公网安备32010402000125 苏ICP备14051488号-3南京思必达教育科技有限公司版权所有

南京思必达教育科技有限公司版权所有   百度统计

最热文章
最新文章
  • 卡尔蔡司镜片优惠店,镜片价格低
  • 苹果原装手机壳