Oracle XE 21c on Centos 8
Why XE 21c?
For development or small sites, 21c is a great way to test the waters with Oracle. As per the press release - "You get an Oracle Database to use in any environment, plus the ability to embed and redistribute – all completely free!"
- 2 CPU threads
- 2 GB of RAM
- 12GB of user data
- Supports Pluggable databases
Create a host
For my purposes I created a Digital Ocean droplet.
- CentOS 8 Stream x64
- Basic, 2CPU, 2GB, 60GB, regular SSD is $15/mo
- Select Data Center central to your usual user activity, NYC3 for me
- Select preferred login method (password or SSH key)
Initial Server Setup with Centos 8
Upon first login:
# Install utilities and get image packages current yum install wget yum -y update
Install Oracle XE 21c
# Download and install Pre-Install .rpm wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm yum -y install oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm # Download and install RDBMS .rpm wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm yum -y install oracle-database-xe*
Enter password ( Oracle1234 for low security test systems )
Post DB Creation
- Default PDB created is XEPDB1
- Sys/system/pdbsys passwords were set above in configure script, add them to your Password Vault!
100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/XE. Database Information: Global Database Name:XE System Identifier(SID):XE Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details. Connect to Oracle Database using one of the connect strings: Pluggable database: localhost.localdomain/XEPDB1 Multitenant container database: localhost.localdomain Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
Set DB to autostart as root:
systemctl daemon-reload systemctl enable oracle-xe-21c
alter system set db_create_file_dest='/opt/oracle/oradata' scope=both sid='*'; drop pluggable database XEPDB1 including datafiles; create pluggable database apexdev admin user pdbsys identified by Oracle1234; create pluggable database apextst admin user pdbsys identified by Oracle1234; create pluggable database apexprd admin user pdbsys identified by Oracle1234; alter pluggable database apexdev open; alter pluggable database apextst open; alter pluggable database apexprd open; alter pluggable database apexdev save state; alter pluggable database apextst save state; alter pluggable database apexprd save state;
firewall-cmd --zone=public --add-port=1521/tcp