oracle19c安装-基于rpm

一、下载rpm包

oracle-database-ee-19c-1.0-1.x86_64.rpm
下载页面链接: https://www.oracle.com/cn/database/technologies/oracle-database-software-downloads.html#19c

二、安装前准备

2.1 添加yum源及安装oracle数据库前配置(对应自己的版本)

##OL7
curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 > /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

cat > /etc/yum.repos.d/oracle-linux-ol7.repo <<"EOF"
[ol7_baseos_latest]
name=Oracle Linux 7 BaseOS Latest ($basearch)  
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF


##OL8
curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol8 > /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

cat > /etc/yum.repos.d/oracle-linux-ol8.repo <<"EOF"
[ol8_baseos_latest]
name=Oracle Linux 8 BaseOS Latest ($basearch)  
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol8_appstream]
name=Oracle Linux 8 Application Stream Packages ($basearch) 
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF


##OL9
curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 > /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

cat > /etc/yum.repos.d/oracle-linux-ol9.repo <<"EOF"
[ol9_baseos_latest]
name=Oracle Linux 9 BaseOS Latest ($basearch)  
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol9_appstream]
name=Oracle Linux 9 Application Stream Packages ($basearch) 
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF

yum clean all &> /dev/null
yum makecache &> /dev/null

yum -y install oracle-database-preinstall-19c.x86_64

2.2 安装依赖包(正常不需要,有问题可以参考)

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/compat-libcap1-1.10-7.el7.x86_64.rpm
yum -y localinstall compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm compat-libcap1-1.10-7.el7.x86_64.rpm 

yum -y install bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libgcc libnsl librdmacm-devel libstdc++ libstdc++-devel libX11 libXau libxcb libXi libXrender libXrender-devel libXtst make net-tools nfs-utils python3 python3-configshell python3-rtslib python3-six smartmontools sysstat targetcli unzip

三、安装数据库

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

四、初始化数据库

可以根据需要更改配置/etc/init.d/oracledb_ORCLCDB-19c

/etc/init.d/oracledb_ORCLCDB-19c configure

五、配置oracle用户

5.1 修改oracle用户密码

echo 'oracle:oraclepwd' | chpasswd

5.2 为oracle用户添加环境变量

路径按照自己的修改,我用的默认路径

su - oracle
cat >> .bash_profile <<"EOF"
#ORACLE-ENV
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export ORACLE_SID=ORCLCDB
export NLS_LANG=AMERICAN_AMERICA.UTF8
#alias sqlplus='rlwrap sqlplus'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/lib
export NLS_DATE_FORMAT='yyyy-MM-dd hh24:mi:ss'
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin
export PATH
EOF

六、错误问题及解决方法参考链接

https://www.modb.pro/db/224513?utm_source=index_ai
https://blog.csdn.net/LDaMin/article/details/131907382
oracle安装手册
https://yum.oracle.com/

七、oracle轻量级客户端下载

https://www.oracle.com/cn/database/technologies/instant-client/winx64-64-downloads.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一点见解

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值