CentOS Stream 8
Sponsored Link

Oracle Database 19c : Install from RPM Package2021/06/01

 
Install Oracle Database 19c from RPM Package.
[1] Download RPM package for Oracle Databse 19c from the following site and upload it to your Server.
⇒  https://www.oracle.com/database/technologies/oracle-database-software-downloads.html

[2] Install an RPM package for Pre-Installation first.
[root@dlp ~]#
dnf -y install https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm

[3] Install Oracle Database 19c.
[root@dlp ~]#
rpm -Uvh oracle-database-ee-19c-1.0-1.x86_64.rpm

Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracle-database-ee-19c-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-19c configure

[root@dlp ~]#
vi /etc/sysconfig/oracledb_ORCLCDB-19c.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-19c configure

Configuring Oracle Database ORCLCDB.
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/19c/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
[oracle@dlp ~]$
source ~/.bash_profile
# verify connection

[oracle@dlp ~]$
sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jun 1 03:18:05 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select instance_name, host_name, version, startup_time from v$instance; 

INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
VERSION           STARTUP_T
----------------- ---------
ORCLCDB
dlp.srv.world
19.0.0.0.0        01-JUN-21

SQL> exit 
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[5] Create Systemd setting file.
[root@dlp ~]#
vi /etc/oratab
# last line : change

ORCLCDB:/opt/oracle/product/19c/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/19c/dbhome_1
ORACLE_SID=ORCLCDB
# configure database service

[root@dlp ~]#
vi /usr/lib/systemd/system/ORCLCDB@oracledb.service
# this is an example, modify for free

[Unit]
Description=Oracle Database service
After=network.target

[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/ORCLCDB.oracledb
ExecStart=/opt/oracle/product/19c/dbhome_1/bin/dbstart $ORACLE_HOME
ExecStop=/opt/oracle/product/19c/dbhome_1/bin/dbshut $ORACLE_HOME
User=oracle

[Install]
WantedBy=multi-user.target

[root@dlp ~]#
systemctl daemon-reload

[root@dlp ~]#
systemctl enable ORCLCDB@oracledb

Matched Content