安裝環境:CentOS 7.2
19C的RPM包下載鏈接,https://docs.oracle.com/en/database/oracle/oracle-database/19/index.html
使用手工方式,通過RPM安裝19c數據庫,只需要兩步操作:
步驟1:安裝oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
如果OEL平台,只需要執行
yum -y install oracle-database-preinstall-19c
如果不是OEL平台,首先要下載對應平台的RPM,我用的是RedHat 7.4,下載鏈接地址,https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/index.html
第一次執行,未必就可以成功,在我的測試環境,從錯誤的提示看,少了一些依賴庫,
yum install -y 缺少依賴包
依賴包離線下載:http://www.rpmfind.net/linux/rpm2html/search.php?query=compat-libstdc%2B%2B-33(x86-64)
// 安裝 [root@localhost ~]# rpm -ivh oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm warning: oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ################################# [100%] Updating / installing... 1:oracle-database-preinstall-19c-1.################################# [100%]
步驟2:安裝oracle-database-ee-19c-1.0-1.x86_64.rpm
yum install -y oracle-database-ee-19c-1.0-1.x86_64.rpm
創建數據庫
[root@localhost ~]# /etc/init.d/oracledb_ORCLCDB-19c configure
編輯profile文件配置ORACLE環境變量
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 export ORACLE_SID=ORCLCDB export PATH=$ORACLE_HOME/bin:$PATH source /etc/profile //創建軟連接 ln -s $ORACLE_HOME/bin/sqlplus /usr/bin //切換到oracle 用戶 su - oracle sqlplus# username: system# password: helowin sqlplus / as sysdba