获取oracle-database-preinstall-19c
wget https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
oracle-database-ee-19c下载地址:
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
获取并安装已淘汰的依赖文件
wget http://mirror.centos.org/centos-7/7/os/x86_64/Packages/compat-libcap1-1.10-7.el7.x86_64.rpm wget http://mirror.centos.org/centos-7/7/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm rpm -i compat-libcap1-1.10-7.el7.x86_64.rpm compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
安装依赖
dnf install glibc-devel ksh libaio-devel libstdc++-devel sysstat xorg-x11-utils xorg-x11-xauth libnsl
安装oracle-database-preinstall-19c
rpm -i oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
安装oracle-database-ee-19c1
dnf -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
安装完成后执行配置数据库
/etc/init.d/oracledb_ORCLCDB-19c configure
切换至oracle用户的主目录并编辑环境变量
su oracle cd ~ vim .bash_profile
在文件的最后添加
export ORACLE_BASE=/opt/oracle export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 export ORACLE_SID=ORCLCDB export PATH=$ORACLE_HOME/bin:$PATH:$HOME/.local/bin:$HOME/bin
应用环境变量
source .bash_profile
sqlplus / as sysdba
创建oracle用户和组并变更安装目录所有者(已由RPM自动配置,请忽略)
groupadd oinstall
groupadd dba
useradd oracle -g oinstall -G dba
chown oracle:oinstall /opt/oracle ↩︎