Oracle Database 18c : Install from RPM Package2018/12/07 |
Install Oracle Database 18c from RPM Package.
|
|
[1] |
Download RPM package for Oracle Databse 18c from the following site and upload it to your Server.
⇒ http://www.oracle.com/technology/software/products/database/index.html |
[2] | Install an RPM package for Pre-Installation first. |
[root@dlp ~]# curl http://public-yum.oracle.com/public-yum-ol7.repo -o /etc/yum.repos.d/public-yum-ol7.repo [root@dlp ~]# sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/public-yum-ol7.repo [root@dlp ~]# rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 [root@dlp ~]# yum --enablerepo=ol7_latest -y install oracle-database-preinstall-18c |
[3] | Install Oracle Database 18c. |
[root@dlp ~]# rpm -Uvh oracle-database-ee-18c-1.0-1.x86_64.rpm 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[root@dlp ~]# vi /etc/sysconfig/oracledb_ORCLCDB-18c.conf # change default settings if you need # listening port for Listener LISTENER_PORT=1521 # data location ORACLE_DATA_LOCATION=/opt/oracle/oradata # EM_EXPRESS_PORT: Oracle EM Express listener # listening port for Enterprise Manager EM_EXPRESS_PORT=5500 # create sample Database [ORCLCDB] [root@dlp ~]# /etc/init.d/oracledb_ORCLCDB-18c configure Configuring Oracle Database ORCLCDB. [ 4361.688440] nr_pdflush_threads exported in /proc is scheduled for removal Prepare for db operation 8% complete Copying database files 31% complete Creating and starting Oracle instance 32% complete 36% complete 40% complete 43% complete 46% complete Completing Database Creation 51% complete 54% complete Creating Pluggable Databases 58% complete 77% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/ORCLCDB. Database Information: Global Database Name:ORCLCDB System Identifier(SID):ORCLCDB Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details. Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user. |
[4] | Set environment variables for Oracle user. |
[oracle@dlp ~]$
vi ~/.bash_profile # add to the end
umask 022
export ORACLE_SID=ORCLCDB export ORACLE_BASE=/opt/oracle/oradata export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin
[oracle@dlp ~]$
source ~/.bash_profile
# verify working [oracle@dlp ~]$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Fri Dec 7 11:20:41 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
|
[5] | Create Systemd Setting file. |
[root@dlp ~]#
vi /etc/oratab # last line : change ORCLCDB:/opt/oracle/product/18c/dbhome_1: Y
[root@dlp ~]#
vi /etc/sysconfig/ORCLCDB.oracledb # create new : define environment variables ORACLE_BASE=/opt/oracle/oradata ORACLE_HOME=/opt/oracle/product/18c/dbhome_1 ORACLE_SID=ORCLCDB # this is an example, modify for free [Unit] Description=Oracle Net Listener After=network.target [Service] Type=forking EnvironmentFile=/etc/sysconfig/ORCLCDB.oracledb ExecStart=/opt/oracle/product/18c/dbhome_1/bin/lsnrctl start ExecStop=/opt/oracle/product/18c/dbhome_1/bin/lsnrctl stop User=oracle [Install] WantedBy=multi-user.target # this is an example, modify for free [Unit] Description=Oracle Database service After=network.target lsnrctl.service [Service] Type=forking EnvironmentFile=/etc/sysconfig/ORCLCDB.oracledb ExecStart=/opt/oracle/product/18c/dbhome_1/bin/dbstart $ORACLE_HOME ExecStop=/opt/oracle/product/18c/dbhome_1/bin/dbshut $ORACLE_HOME User=oracle [Install] WantedBy=multi-user.target systemctl daemon-reload [root@dlp ~]# systemctl enable ORCLCDB@lsnrctl ORCLCDB@oracledb |
Sponsored Link |
|