如何使用RPM安装ORACLE-19c数据库

ORACLE19c引入了一个非常方便的安装方法,使用RPM的方式安装!今天我给大家讲一下如何使用RPM来快捷的安装19c

首先我们得要知道的第一个不同点就是:19c官方支持的系统版本:

Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6: 5.4.17-2011.0.7.el8uek.x86_64 or later
Oracle Linux 8 with the Red Hat Compatible kernel: 4.18.0-80.el8.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4: 4.1.12-124.19.2.el7uek.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 5: 4.14.35-1818.1.6.el7uek.x86_64 or later
Oracle Linux 7.5 with the Red Hat Compatible kernel: 3.10.0-862.11.6.el7.x86_64 or later

Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later

Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later

SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later

SUSE Linux Enterprise Server 15: 4.12.14-23-default or later

简单地来说,19c需要运行在linux7.5以上的系统,7.5以下可能会存在bug

服务器的运行内存需要达到1G以上,/tmp目录需要预留出1GB的空间,数据库软件大概要占用空间10g,但是oracle建议至少要预留100G的空间,避免日后软件目录不断扩大导致的空间不足。

好了,当这些硬性条件满足后,我们就可以开始安装19c数据库!

一:介质需求

我们需要先从以下地址,也就是官网上下载一个oracle19c的rpm安装包

http://www.oracle.com/technetwork/indexes/downloads/index.html

Oracle:19.3.0.0.0
oracle-database-ee-19c-1.0-1.x86_64.rpm

二:关闭防火墙以及selinux

关闭防火墙

首先防火墙是一定要一定要关闭的哦
#systemctl stop firewalld.service
关闭操作系统自启动
#systemctl disable firewalld.service
检查关闭情况
systemctl status firewalld.service
如下,dead表示未开启开机启动;inactive表示现在的状态是关闭
 
[root@DBServer1 ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

三:安装依赖包

大部分依赖包已经集成在之前我们下载的rpm包里面,但一下依赖包仍然需要我们安装

yum install libstdc++-devel compat-libstdc++-33 ksh glibc-devel libaio-devel compat-libcap1

四:下载并安装预安装包

从oracle源下载原装包到本地

curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

安装预安装包

yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

五:配置环境变量

su – oracle
vi ~/.bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=ORCLCDB

六:安装oracle软件

将介质传输到/tmp下 进行安装

cd /tmp
yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm

命令执行完毕后,软件安装成功

七;安装oracle数据库

配置脚本

su – root
cd /etc/init.d/
vi oracledb_ORCLCDB-19c

在这里插入图片描述

八:执行脚本,开始安装

等待100%complete

./oracledb_ORCLCDB-19c configure

在这里插入图片描述

九:修改sys密码

alter user sys identified by oracle;
alter uer system identified by oracle;

安装成功!

如果环境不能安装使用:-- rpm -ivh *****.rpm --nodeps --force rpm -Uvh binutils-2*x86_64* rpm -Uvh g2*x86_64* nss-softokn-freebl-3*x86_64* nss-softokn-freebl-3*i686* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh glibc-2*i686* rpm -Uvh compat-libstdc++-33*x86_64* rpm -Uvh glibc-common-2*x86_64* rpm -Uvh glibc-devel-2*x86_64* rpm -Uvh glibc-devel-2*i686* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh glibc-headers-2*x86_64* rpm -Uvh elfutils-libelf-0*x86_64* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh elfutils-libelf-devel-0*x86_64* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh gcc-4*x86_64* rpm -Uvh gcc-c++-4*x86_64* rpm -Uvh ksh-*x86_64* rpm -Uvh libaio-0*x86_64* rpm -Uvh libaio-devel-0*x86_64* rpm -Uvh libaio-0*i686* rpm -Uvh libaio-devel-0*i686* rpm -Uvh libgcc-4*x86_64* rpm -Uvh libgcc-4*i686* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh libstdc++-4*x86_64* rpm -Uvh libstdc++-4*i686* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh libstdc++-devel-4*x86_64* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh make-3.81*x86_64* rpm -Uvh numactl-devel-2*x86_64* rpm -Uvh sysstat-9*x86_64* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh compat-libstdc++-33*i686* -- rpm -ivh *****.rpm --nodeps --force rpm -Uvh compat-libcap* rpm -Uvh unixODBC-2.2.11-7.1.i386 rpm -Uvh unixODBC-2.2.11-10.el5.x86_64 rpm -Uvh unixODBC-devel-2.2.2-3.i386 rpm -Uvh unixODBC-devel-2.2.3-6.i386 rpm -Uvh unixODBC-devel-2.2.11-7.1.i386 rpm -Uvh unixODBC-devel-2.2.11-10.el5.x86_64 tar -zxvf unixODBC-2.3.1.tar.gz
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值