一、基础环境配置
1、关闭系统防火墙
systemctl stop firewalld
syustemctl disable firewalld
2、关闭selinux
vim /etc/selinux/config
SELINUX=disabled
3、准备安装oracle安装所需依赖
说明:下载安装oracle时所需依赖的rpm包,然后制作本地yum源进行安装rpm依赖包
下载地址:https://pan.baidu.com/s/1zg6DUG0BTxY7H63lj78CrA 提取码:2ucb
unzip base.zip
创建离线yum源,备份原有repo文件,创建local.repo文件
echo "[local]" > /etc/yum.repos.d/local.repo echo "name=local" >> /etc/yum.repos.d/local.repo echo "enable=1" >> /etc/yum.repos.d/local.repo echo "baseurl=file:///root/base" >> /etc/yum.repos.d/local.repo echo "gpgcheck=0" >> /etc/yum.repos.d/local.repo
yum clean all
4、安装oracle-database-preinstall
链接:https://pan.baidu.com/s/11TGhQ8H95umuV5PRUrfEcw 提取码:3yru
yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
二、安装Oracle 19c
1、安装Oracle 19c
下载地址:https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
初始化Oracle数据库:
/etc/init.d/oracledb_ORCLCDB-19c configure
配置环境变量:
su - oracle
vim /etc/profile export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin export ORACLE_SID=ORCLCDB
登陆oracle数据库:
sqlplus / as sysdba
修改密码:
alter user system identified by 123456;
重新登录: