Wednesday, April 6, 2022

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

Oracle Database 21c Express Edition (XE) RPM, Oracle Linux 7 (OL7), Oracle Linux 8 (OL8), Oracle Database Exam Prep, Oracle Database Career, Database Skill, Database Jobs, Oracle Database Preparation

This article describes the Oracle Database 21c Express Edition (XE) RPM installation on Oracle Linux 7 (OL7) and 8 (OL8) 64-bit. The article is based on a server installation with a minimum of 2G swap and secure Linux set to permissive. An example of this type of Linux installation can be seen here (OL7 or OL8).

◉ Oracle Installation

Download the 21c XE RPM file for your distribution from the Express Edition (XE) download page here.

With the RPM file downloaded, we 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 we 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.

# OL7

#yum install -y oracle-database-preinstall-21c

yum -y localinstall oracle-database-xe-21c-1.0-1.ol7.x86_64.rpm

# OL8

#dnf install -y oracle-database-preinstall-21c

dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm

On RHEL you will need to manually get the prerequisites RPM from the Yum repository and run it manually before installing the database 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

◉ Create Database

We can do some minor configuration by editing the "/etc/sysconfig/oracle-xe-21c.conf" file before before continuing, but we don't need to.

Running the following script as the "root" user creates a database called "XE", with a pluggable database (PDB) called "XEPDB1". It's interactive by default as we have to specify a password, which is used for the SYS, SYSTEM and PDBADMIN users. There is an example of running it silently also.

# Interactive

/etc/init.d/oracle-xe-21c configure

# Silent

/etc/init.d/oracle-xe-21c configure <<EOF

SysPassword1

SysPassword1

EOF

◉ Auto-Start

We configure the database to auto-start using the following command from the "root" user.

systemctl start oracle-xe-21c

systemctl enable oracle-xe-21c

◉ Vagrant Example

If you want to see it in action, you might want to try these Vagrant builds.

- OL7 21c XE

- OL8 21c XE

Source: oracle-base.com

Related Posts

0 comments:

Post a Comment