资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

怎么在Centos7中安装Oracle11GR2数据库

这篇文章主要讲解了“怎么在Centos7中安装Oracle 11G R2数据库”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么在Centos7中安装Oracle 11G R2数据库”吧!

站在用户的角度思考问题,与客户深入沟通,找到崂山网站设计与崂山网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都做网站、成都网站制作、企业官网、英文网站、手机端网站、网站推广、域名注册雅安服务器托管、企业邮箱。业务覆盖崂山地区。

1.软件下载

登录Oracle技术网站下载Oracle Database 11g 第2 版,下载的时候选择现在系统版本为Linux x86-64的版本。

下载路径:

https://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/index.html

2. 系统环境准备

参考文档:https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

  • 硬件环境需求:

内存要求:

 怎么在Centos7中安装Oracle 11G R2数据库

Swap空间要求:

 怎么在Centos7中安装Oracle 11G R2数据库

磁盘空间要求:

 怎么在Centos7中安装Oracle 11G R2数据库

 怎么在Centos7中安装Oracle 11G R2数据库

  • 软件环境需求:

Oracle 11G R2系统版本要求:

 怎么在Centos7中安装Oracle 11G R2数据库

Package版本需求:

 怎么在Centos7中安装Oracle 11G R2数据库

此次使用的硬件及系统版本为:

内存:2GB

CPU:1核

系统版本:CentOS Linux release 7.6.1810 (Core)

Linux内核版本:3.10.0-957.21.3.el7.x86_64

  • 安装依赖包之前,先配置yum源:

       查看并备份当前yum

        [root@localhost oracle_install]# cd /etc/yum.repos.d/

     

        [root@localhost yum.repos.d]# mkdir repo_bak

        [root@localhost yum.repos.d]# mv *.repo repo_bak/

        下载网易和阿里云repo文件

        [root@localhost yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo

        [root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo     

        [root@localhost yum.repos.d]# ls

        CentOS7-Base-163.repo  Centos-7.repo  repo_bak

        

        清除yum缓存

        [root@localhost yum.repos.d]# yum clean all

        重新生成yum缓存

        [root@localhost yum.repos.d]# yum makecache

  • 安装依赖包

        当前使用操作系统为64位,所以选择相应64位依赖包进行安装,另外如提示没有相应依赖包,可选择安装新版本的

        yum install -y binutils-2.23.52.0.1-12.el7.x86_64 

        yum install -y compat-libcap1-1.10-3.el7.x86_64 

        yum install -y compat-libstdc++-33-3.2.3-71.el7.x86_64

        yum install -y gcc-4.8.2-3.el7.x86_64 

        yum install -y gcc-c++-4.8.2-3.el7.x86_64 

        yum install -y glibc-2.17-36.el7.x86_64 

        yum install -y glibc-devel-2.17-36.el7.x86_64 

        yum install -y ksh

        yum install -y libaio-0.3.109-9.el7.x86_64 

        yum install -y libaio-devel-0.3.109-9.el7.x86_64 

        yum install -y libgcc-4.8.2-3.el7.x86_64 

        yum install -y libstdc++-4.8.2-3.el7.x86_64 

        yum install -y libstdc++-devel-4.8.2-3.el7.x86_64 

        yum install -y libXi-1.7.2-1.el7.x86_64 

        yum install -y libXtst-1.2.2-1.el7.x86_64 

        yum install -y make-3.82-19.el7.x86_64 

        yum install -y sysstat-10.1.5-1.el7.x86_64

         yum install -y elfutils-libelf-devel.x86_64 0:0.176-2.el7

         yum install -y unixODBC-2.3.1-14.el7.x86_64 

         yum install -y unixODBC-devel-2.3.1-14.el7.x86_64  

        

  •  创建用户组和用户

        [root@localhost ~]# groupadd oinstall

        [root@localhost ~]# groupadd dba

        [root@localhost ~]# useradd -g oinstall -G dba oracle

        [root@localhost ~]#  id oracle

        uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)

        [root@localhost ~]# passwd oracle

  • 创建目录

    [root@localhost /]# mkdir -p /db/oracle

        [root@localhost /]# mkdir -p /db/oraInventory

        [root@localhost /]# mkdir -p /db/database

        [root@localhost /]# cd /db

        [root@localhost db]# chown -R oracle:oinstall /db/oracle

        [root@localhost db]# chown -R oracle:oinstall /db/oraInventory/

        [root@localhost db]# chown -R oracle:oinstall /db/database/

  • 修改系统标识(oracle不识别centos系统)

        [root@localhost db]# cat /etc/redhat-release 

        CentOS Linux release 7.6.1810 (Core) 

        [root@localhost db]# vi /etc/redhat-release 

        [root@localhost db]# cat /etc/redhat-release 

        redhat-7

  • 修改内核参数

        [root@localhost db]# vi /etc/sysctl.conf

        内容如下:

        net.ipv4.icmp_echo_ignore_broadcasts = 1

        net,ipv4.conf.all.rp_filter = 1

        fs.aio-max-nr = 1048576

        fs.file-max = 6815744

        kernel.shmall = 2097152

        kernel.shmmax = 536870912

        kernel.shmmni = 4096

        kernel.sem = 250 32000 100 128

        net.ipv4.ip_local_port_range = 9000 65500

        net.core.rmem_default = 262144

        net.core.rmem_max = 4194304

        net.core.wmem_default = 262144

        net.core.wmem_max = 1048576

  • 配置oracle用户参数

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

        添加:

        oracle soft nproc 2047

        oracle hard nproc 16384

        oracle soft nofile 1024

        oracle hard nofile 65536

  • 关闭selinux

        [root@localhost yum.repos.d]# vi /etc/selinux/config

        将SELINUX=enforcing改为SELINUX=disabled

        设置后需要重启才能生效

  • 配置用户环境变量

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

        追加内容:

        export ORACLE_BASE=/db/oracle

        export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 

        export ORACLE_SID=orcl 

        export ORACLE_TERM=xterm 

        export PATH=$ORACLE_HOME/bin:$PATH 

        export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib 

        export LANG=C

        export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

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

  • 上传oracle安装包,并解压

        [root@localhost oracle_install]# unzip "*.zip"

        [root@localhost oracle_install]# ls

        database  linux.x64_11gR2_database_1of2.zip  linux.x64_11gR2_database_2of2.zip

        [root@localhost oracle_install]# mv database/ /db/database/

        [root@localhost db]# chown -R oracle:oinstall /db/database/database/ 

      3. 数据库安装

  • 安装时要先进行图形化配置(root用户)

        [root@localhost database]# export DISPLAY=:0.0         

        [root@localhost database]# xhost +

        access control disabled, clients can connect from any host

  • 图形化设置(oracle用户)

        [root@localhost database]# su - oracle

         [oracle@localhost ~]$ vi .bash_profile 

        [oracle@localhost ~]$ export DISPLAY=:0.0

  • 图形化配置完成,开始安装(oracle用户 )

        [oracle@localhost db]$ cd /db/database/database/

        [oracle@localhost database]$ ./runInstaller 

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

  怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库       

       怎么在Centos7中安装Oracle 11G R2数据库 

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

       怎么在Centos7中安装Oracle 11G R2数据库

  • 安装完成时需要root用户下执行两个脚本

        [root@localhost ~]#/db/oraInventory/orainstRoot.sh

        [root@localhost db]#/db/oracle/product/11.2.0/db_1/root.sh 

        至此数据库安装完成。

            

感谢各位的阅读,以上就是“怎么在Centos7中安装Oracle 11G R2数据库”的内容了,经过本文的学习后,相信大家对怎么在Centos7中安装Oracle 11G R2数据库这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


网站标题:怎么在Centos7中安装Oracle11GR2数据库
URL链接:http://cdkjz.cn/article/jhcdoe.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220