前言
这里重点说一下Linux配置,很关键,涉及到安装速度和成功与否。 硬盘至少20G,内存至少2G,建议4G。
相关包下载
RPM包
去这个网址下载rpm包,需要账号登录。
依赖包下载
preinstall
也可以直接Linux命令:
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
关闭Linux防火墙和selinux
systemctl stop firewalld
syustemctl disable firewalld
$ vi /etc/selinux/config
SELINUX=disabled
安装
将下载的包上传到Linux系统某个文件夹下面,进入到目录下执行以下命令。
安装依赖
yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
安装oracle
yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
初始化oracle
需要等一会儿
/etc/init.d/oracledb_ORCLCDB-19c configure
配置环境变量,切换到oracle用户(已经存在了的)
su - oracle
vim .bash_profile
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin
export ORACLE_SID=ORCLCDB
source .bash_profile
登录数据库
修改密码
alter user system identified by 123456;
使用Navicat连接oracle测试
本文参考文章:
https://www.eygle.com/archives/2019/05/oracle_19c_rpm_install.html
https://blog.csdn.net/ywd1992/article/details/92830401