Oracle XE Linux – Oracle Database 21c Express Edition

Oracle 21xe Installation on OEL8

Installation is performed using Oracle 21c xe RPM and all installation steps will be executed as “root” user.

System Requirements & Limitations

Operating system – Oracle Enterprise Linux 8 used in this article.
Network Protocol Supported – IPC, UDP, TCP/IP, TCP/IP with SSL.
RAM – 1 GB of RAM minimum. 2 GB is recommended. 2 GB cannot be exceeded.
Disk Space – 10GB minimum. Space usage limits to 12GB.
SWAP – Minimum 2 GB or double of RAM allocated.
CPU – Limits to 2 dual-core CPUs.
Installation Location – /opt

Install Database Pre-Installation RPM

Run below command to install all prerequisites for installing 21xe database as “root” user. For OEL will be installed automatically by downloading the rpm.

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

Note – For RHEL download oracle database preinstall 21c RPM and install. As part of pre-installation “oracle” user, groups will be be created and kernel configuration settings required for Oracle installations are set. After completion of pre-reqs create password for Oracle user.

Oracle User Password –

passwd oracle

Install 21xe RPM

Download Oracle 21c express edition RPM (oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm) for OEL8 and FTP to Linux machine.

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

Configure Database

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

or

(echo "password"; echo "password";) | /etc/init.d/oracle-xe-21c configure >> /xe_logs/XEsilentinstall.log 2>&1

At the prompt, specify a password for the SYS, SYSTEM, and PDBADMIN administrative user accounts.

Connect to DB

[oracle@localhost ~]$ sqlplus
SQL*Plus: Release 21.0.0.0.0 - Production on Sat Jun 24 17:57:11 2023
Version 21.3.0.0.0Copyright (c) 1982, 2021, Oracle.  All rights reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> col name format A10;
SQL>  select NAME, OPEN_MODE from v$pdbs;
NAME       OPEN_MODE
---------- ----------
PDB$SEED   READ ONLY
XEPDB1     READ WRITE
SQL>

Config, Database Files and Logs Location

$ORACLE_BASE = /opt/oracle
$ORACLE_HOME = /opt/oracle/product/21c/dbhomeXE
$ORACLE_SID = XE
DIAG LOCATION = /opt/oracle/diag
Datafiles Location = /opt/oracle/oradata/XE

Connect XE DB on Vrtualbox Linux from Local Windows

If you see any issue in connecting to XE DB from windows local, disable firewall on Linux and re-try connecting. To disable firewall run below commands using root user.

systemctl stop firewalld

systemctl disable firewalld

Open CMD -> sqlplus

C:\>sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jun 24 18:09:06 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Enter user-name: sys/passwd@hostname:1521/XE as sysdba
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> select name, open_mode from v$database;
NAME      OPEN_MODE
--------- --------------------
XE        READ WRITE
SQL>

Leave a Comment