Download and install the Oracle Pre-installation RPM
[oracle@host01 gghome]$ su –
Password:
[root@host01 ~]# yum install oracle-database-preinstall-18c
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
oracle-database-preinstall-18c x86_64 1.0-1.el6 public_ol6_latest 18 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 18 k
Installed size: 55 k
Is this ok [y/N]: y
Downloading Packages:
oracle-database-preinstall-18c-1.0-1.el6.x86_64.rpm | 18 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : oracle-database-preinstall-18c-1.0-1.el6.x86_64 1/1
Verifying : oracle-database-preinstall-18c-1.0-1.el6.x86_64 1/1
Installed:
oracle-database-preinstall-18c.x86_64 0:1.0-1.el6
Complete!
[root@host01 ~]#
Download the Oracle Database RPM-based software
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Note: Ensure minimum 8 GB is available in the / file system
[root@host01 oracle]# yum -y localinstall /media/sf_software/oracle-database-ee-18c-1.0-1.x86_64.rpm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Local Package Process
Examining /media/sf_software/oracle-database-ee-18c-1.0-1.x86_64.rpm: oracle-database-ee-18c-1.0-1.x86_64
Marking /media/sf_software/oracle-database-ee-18c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package oracle-database-ee-18c.x86_64 0:1.0-1 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version
Repository Size
================================================================================
Installing:
oracle-database-ee-18c x86_64 1.0-1 /oracle-database-ee-18c-1.0-1.x86_64 7.8 G
Transaction Summary
================================================================================
Install 1 Package(s)
Total size: 7.8 G
Installed size: 7.8 G
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : oracle-database-ee-18c-1.0-1 [### ] 1/1
[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
Verifying : oracle-database-ee-18c-1.0-1.x86_64 1/1
Installed:
oracle-database-ee-18c.x86_64 0:1.0-1
Complete!
[root@host01 oracle]#
[root@host01 product]# pwd
/opt/oracle/product
[root@host01 product]# ls -l
total 4
drwxr-xr-x. 3 oracle oinstall 4096 Oct 31 21:56 18c
Create the ORCLCDB and ORCLPDB1 databases
This script ( /etc/init.d/oracledb_ORCLCDB-18c configure) creates a container database (ORCLCDB) with one pluggable database (ORCLPDB1) and configures the listener at the default port (1521).
We can edit the oracledb_ORCLCDB-18c.conf file to change the EM Express/listener port and the location for the CDB/PDB database files.
[root@host01 app]# cd /etc/sysconfig/
[root@host01 sysconfig]# vi oracledb_ORCLCDB-18c.conf
#This is a configuration file to setup the Oracle Database.
#It is used when running ‘/etc/init.d/oracledb_ORCLCDB configure’.
#Please use this file to modify the default listener port and the
#Oracle data location.
# LISTENER_PORT: Database listener
LISTENER_PORT=1521
# ORACLE_DATA_LOCATION: Database oradata location
#ORACLE_DATA_LOCATION=/opt/oracle/oradata
ORACLE_DATA_LOCATION=/u02/app/oracle/oradata
# EM_EXPRESS_PORT: Oracle EM Express listener
EM_EXPRESS_PORT=5500
~
[root@host01 sysconfig]# /etc/init.d/oracledb_ORCLCDB-18c 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.
[root@host01 ORCLPDB1]# su - oracle [oracle@host01 ~]$ . oraenv ORACLE_SID = [oracle] ? ORCLCDB The Oracle base has been set to /opt/oracle [oracle@host01 ~]$ sqlplus sys as sysdba SQL*Plus: Release 18.0.0.0.0 - Production on Thu Nov 1 14:34:33 2018 Version 18.3.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Version 18.3.0.0.0 SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLPDB1 READ WRITE NO