DBA Hub

📋Steps in this guide1/5

Oracle Database 21c RPM Installation On Oracle Linux 7 (OL7) and Oracle Linux 8 (OL8)

This article describes the RPM installation of Oracle Database 21c 64-bit on Oracle Linux7 (OL7) 64-bit.

oracle 21cconfigurationintermediate
by OracleDba
14 views
1

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server. For example. Set the correct hostname in the "/etc/hostname" file.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
<IP-address>  <fully-qualified-machine-name>  <machine-name>

127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.56.107  ol8-21.localdomain  ol8-21

ol8-21.localdomain
2

Oracle Installation

Download the relevant RPM from download page here . With the RPM file downloaded, you can install the Oracle prerequisites and software using the following command as the "root" user. It automatically pulls down all dependencies, including the "oracle-database-preinstall-21c" package. If you do this the "oracle" user doesn't have a home directory created, so I install the preinstall package first, so the "oracle" user is as I expect it. The additional command is included below, but commented out. On RHEL you will need to manually get the prerequisites RPM from the Yum repository and run it manually before installing the database RPM. The for the software installation is "/opt/oracle/product/21c/dbhome_1".

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# OL7
# yum install -y oracle-database-preinstall-21c
yum -y localinstall oracle-database-ee-21c-1.0-1.ol7.x86_64.rpm

# OL8
# dnf install -y oracle-database-preinstall-21c
dnf -y localinstall oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm

# RHEL7
curl -o oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
yum -y localinstall oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
rm oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm

# RHEL8
curl -o oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
yum -y localinstall oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
rm oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
3

Create Database

In addition to the software installation, the RPM creates a script that allows you to create a demo database called "ORCLCDB", with a pluggable database (PDB) called "ORCLPDB1". You can of course create a database in the normal way, using the Database Configuration Assistant (DBCA). You don't have to use this script.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
/etc/init.d/oracledb_ORCLCDB-21c 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

Thoughts

Here are some thoughts about this method of installation.
5

Vagrant Example

If you want to see it in action, you might want to try one of these Vagrant build. - OL7 - OL8 For more information see: Hope this helps. Regards Tim...

Comments (0)

Please to add comments

No comments yet. Be the first to comment!