1. 安装完preinstall 和 oracle 的rpm版本之后 到这个界面
rpm -ivh oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm warning: oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ################################# [100%] package oracle-database-preinstall-18c-1.0-1.el7.x86_64 is already installed [root@CentOS75 oracle18c]# rpm -ivh oracle-database-ee-18c-1.0-1.x86_64.rpm warning: oracle-database-ee-18c-1.0-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ################################# [100%] Updating / installing... 1:oracle-database-ee-18c-1.0-1 ################################# [100%] [INFO] Executing post installation scripts... [INFO] Oracle home installed successfully and ready to be configured. To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-18c configure
2. 修改一下文件
cd /etc/init.d/
vim oracledb_ORCLCDB-18c
修改如图:
export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1 export ORACLE_VERSION=18c export ORACLE_SID=ORA18CRPMCDB export TEMPLATE_NAME=General_Purpose.dbc export CHARSET=ZHS16GBK export PDB_NAME=ORA18CRPMPDB export LISTENER_NAME=LISTENER export NUMBER_OF_PDBS=1 export CREATE_AS_CDB=true # General exports and vars export PATH=$ORACLE_HOME/bin:$PATH LSNR=$ORACLE_HOME/bin/lsnrctl SQLPLUS=$ORACLE_HOME/bin/sqlplus DBCA=$ORACLE_HOME/bin/dbca ORACLE_OWNER=oracle RETVAL=0 CONFIG_NAME="oracledb_$ORACLE_SID-$ORACLE_VERSION.conf" CONFIGURATION="/etc/sysconfig/$CONFIG_NAME"
3. 增加相应的配置文件
cd /etc/sysconfig/
复制配置文件
cp oracledb_ORCLCDB-18c.conf oracledb_ORA18CRPMCDB-18c.conf
4. 进行配置
使用root 用户执行命令
/etc/init.d/oracledb_ORCLCDB-18c configure
5. 配置安装完成
[root@CentOS75 sysconfig]# /etc/init.d/oracledb_ORCLCDB-18c configure Configuring Oracle Database ORA18CRPMCDB. Prepare for db operation 8% complete Copying database files
6.启动数据库进行验证。
主修修改环境变量等信息