CentOS7下使用yum快速安装配置oracle数据库

本文详细介绍了在CentOS7系统中如何使用yum工具来快速安装和配置Oracle 11g数据库。内容包括设置yum仓库、跳过gpg检查、安装预配置软件包、解决安装过程中遇到的问题,如DISPLAY环境变量配置,以及后续的环境变量配置和数据库验证步骤。
摘要由CSDN通过智能技术生成

CentOS7下使用yum快速安装配置oracle数据库

实验环境

操作系统:CentOS Linux release 7.3.1611 (Core)

IP: 192.168.230.141

原理

使用yum工具安装oracle提供的preinstall包,它将自动执行一些与配置步骤:

  • 自动下载并安装 Oracle Grid Infrastructure 和 Oracle Database 11g 第 2 版 (11.2.0.3) 安装过程所需的任何额外的软件包和特定软件版本,并通过 yum 或 up2date 功能处理软件包依赖关系。
  • 创建用户 oracle 和组 oinstall(针对 OraInventory)、dba(针对 OSDBA),供数据库安装期间使用。(出于安全目的,该用户没有默认口令,且不能远程登录)。要启用远程登录,请使用 passwd 工具设置一个口令。)
  • 修改 /etc/sysctl.conf 中的内核参数以更改共享内存、信号、最大文件描述符数量等设置。
  • 设置 /etc/security/limits.conf 中的软硬 shell 资源限制,如锁定内存地址空间、打开的文件数量、进程数和核心文件大小。
  • 对于 x86_64 计算机,在内核中设置 numa=off。

如此可简化很多配置步骤

配置yum的repo文件

进入yum配置文件夹,添加oracle的yum信息库

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo
[root@localhost yum.repos.d]# rm public-yum-ol7.repo 
rm: remove regular file ‘public-yum-ol7.repo’? y
[root@localhost yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol7.repo
--2017-10-09 19:26:42--  http://public-yum.oracle.com/public-yum-ol7.repo
Resolving public-yum.oracle.com (public-yum.oracle.com)... 23.49.60.35, 173.222.148.42
Connecting to public-yum.oracle.com (public-yum.oracle.com)|23.49.60.35|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6947 (6.8K) [text/plain]
Saving to: ‘public-yum-ol7.repo100%[=========================================================================================>] 6,947       --.-K/s   in 0s      

2017-10-09 19:26:44 (354 MB/s) - ‘public-yum-ol7.repo’ saved [6947/6947]

[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  public-yum-ol7.repo

使用yum安装oracle预安装文件,这里我们选择11g的版本为实验对象

[root@localhost yum.repos.d]# yum install oracle
oracleasm-support.x86_64                        oracle-logos.noarch
oracle-database-server-12cR2-preinstall.x86_64  oracle-rdbms-server-11gR2-preinstall.x86_64
oraclelinux-release.x86_64                      oracle-rdbms-server-12cR1-preinstall.x86_64
[root@localhost yum.repos.d]# yum install oracle-rdbms-server-11gR2-preinstall.x86_64 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-5.el7 will be installed
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: kernel-uek for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-5.el7.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package gcc-c++.x86_64 0:4.8.5-16.el7 will be installed
---> Package kernel-container.x86_64 0:3.10.0-0.0.0.2.el7 will be installed
---> Package ksh.x86_64 0:20120801-34.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-16.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                                          Arch               Version                          Repository              Size
===================================================================================================================================
Installing:
 oracle-rdbms-server-11gR2-preinstall             x86_64             1.0-5.el7                        ol7_latest              21 k
Installing for dependencies:
 compat-libcap1                                   x86_64             1.10-7.el7                       base                    19 k
 compat-libstdc++-33                              x86_64             3.2.3-72.el7                     base                   191 k
 gcc-c++                                          x86_64             4.8.5-16.el7                     base                   7.2 M
 kernel-container                                 x86_64             3.10.0-0.0.0.2.el7               ol7_latest             2.6 k
 ksh                                              x86_64             20120801-34.el7                  base                   883 k
 libaio-devel                                     x86_64             0.3.109-13.el7                   base                    13 k
 libstdc++-devel                                  x86_64             4.8.5-16.el7                     base                   1.5 M

Transaction Summary
===================================================================================================================================
Install  1 Package (+7 Dependent packages)

Total download size: 9.8 M
Installed size: 29 M
Is this ok [y/d/N]: y
Downloading packages:
(1/8): compat-libcap1-1.10-
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值