Setting up Oracle XE 21c on Oracle Linux on Hyper-V

I have experimented the setup of Oracle XE 21c on Hyper-V for testing. It is interesting that Redhat has changed their licensing agreement which most RHEL variants (Oracle Linux, CentOS, Scientific Linux and etc) are not longer automatically binary compatible with RHEL. Most Variants version 8 is still binary compatible while version 9 is completely independent distribution.

I need the Oracle only for learning and testing, therefore, focusing on a well known working method.

1. Create a External Switch on Hyper-V, so that we can access the installed Oracle as a server on the same network

2. Create a VM, with minimal of 2 CPU Core, 8GB of Ram, disable Secure Boot and Use External Switch as the network switch

3. Download and Install Oracle Linux 8 on the VM, we must use Oracle Linux 8.x (9.x is not supported)
Download Link: https://yum.oracle.com/oracle-linux-isos.html

4. After Installation, I configure the following items.
a. Allow Port 1521 and 5500 access for Firewall config, 1521 is used by Oracle Listener, while 5500 is used by Enterprise Manager.
b. Configure the LAN eth0 to be enabled automatically.

5. Download the Oracle XE 21c RPM file, follow the instructions for installation.
Download Link: https://www.oracle.com/database/technologies/appdev/xe/quickstart.html

6. Once installed, configure the password for SYS, SYSDBA and PDBADMIN by running “/etc/init.d/oracle-xe-21c configure”

7. The default installation of Oracle XE is a CDB and PDB installation. There are a few links we can use.
a. Enterprise Manager: https://ip-address:5500/em
b. CDB Service Name: XE
c. PDB Service Name: XEPDB1

8. We can connect to the DB with the following configuration