Sitemap

Oracle APEX 22.2, ORDS & Tomcat Installation Guide

3 min readSep 2, 2026

--

Press enter or click to view image in full size

1. Environment Prerequisites & Setup

Environment Variables

Add the following configuration to your /home/oracle/.bash_profile

# Oracle & Java Settings
export JAVA_HOME=/u01/jdk-11.0.9
export PATH=$JAVA_HOME/bin:$PATH

# Tomcat Settings
export CATALINA_HOME=/u01/apache-tomcat-9.0.45
export CATALINA_BASE=$CATALINA_HOME
export CATALINA_OPTS="$CATALINA_OPTS -Duser.timezone=UTC"

# ORDS Settings
export ORDS_HOME=/u01/ords
export ORDS_CONFIG=/u01/ords/config
export ORDS_LOGS=${ORDS_CONFIG}/logs
export PATH=$ORDS_HOME/bin:$PATH

# ORDS Deployment Parameters
export DB_PORT=1521
export DB_SERVICE=orclpdb
export SYSDBA_USER=SYS
export SYSDBA_PASSWORD=SysPassword1
export ORDS_PASSWORD=Password1

# Tomcat Java Options for ORDS
export JAVA_OPTS="-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M"

Apply the profile changes:

source ~/.bash_profile

2. Oracle APEX Installation

Step 1: Create Tablespace

Log into your target Pluggable Database (PDB) as SYSDBA:

sqlplus / as sysdba
ALTER SESSION SET CONTAINER = orclpdb;

CREATE TABLESPACE apex
DATAFILE '/u01/app/oracle/oradata/orcl/apex01.dbf'
SIZE 100M AUTOEXTEND ON NEXT 1M;

Step 2: Extract & Install APEX

Extract the APEX package and run the installation script:

cd /u01
unzip apex_22.2.zip
cd apex
sqlplus / as sysdba
ALTER SESSION SET CONTAINER = orclpdb;

-- Syntax: @apexins.sql tablespace_apex tablespace_files tablespace_temp images
@apexins.sql APEX APEX TEMP /i/

Step 3: Configure APEX Instance & Users

Set the Instance Administrator password:

@apxchpwd.sql

Configure RESTful Services:

@apex_rest_config.sql

Unlock and update APEX schema accounts:

ALTER USER APEX_220200 IDENTIFIED BY "Pass" ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY "Pass" ACCOUNT UNLOCK;
ALTER USER ANONYMOUS IDENTIFIED BY "Pass" ACCOUNT UNLOCK;

Get Foyez Ahmed Rony’s stories in your inbox

Join Medium for free to get updates from this writer.

3. ORDS Installation & Configuration

Step 1: Prepare ORDS Directory

mkdir -p /u01/ords/config/logs
cd /u01/ords
unzip /path/to/ords-22.x.zip

Step 2: Silent ORDS Installation (ORDS 22.x+)

Run the unattended installation against your PDB:

ords --config ${ORDS_CONFIG} install \
--log-folder ${ORDS_LOGS} \
--admin-user ${SYSDBA_USER} \
--db-hostname localhost \
--db-port ${DB_PORT} \
--db-servicename ${DB_SERVICE} \
--feature-db-api true \
--feature-rest-enabled-sql true \
--feature-sdw true \
--gateway-mode proxied \
--gateway-user APEX_PUBLIC_USER \
--password-stdin <<EOF
${SYSDBA_PASSWORD}
${ORDS_PASSWORD}
EOF

Unlock ORDSYS schema if locked:

sqlplus / as sysdba
ALTER SESSION SET CONTAINER = orclpdb;
ALTER USER ORDSYS IDENTIFIED BY "Pass" ACCOUNT UNLOCK;

4. Apache Tomcat Integration & Deployment

Step 1: Deploy APEX Static Images

Copy APEX static assets to Tomcat’s web root:

[oracle@oracledb u01]$ tar -xzf jdk-11.0.9_linux-x64_bin.tar.gz
[oracle@oracledb u01]$ tar -xzf apache-tomcat-9.0.45.tar.gz

#Copy the APEX images to the Tomcat "webapps" directory.
mkdir -p $CATALINA_HOME/webapps/i/
cp -R /u01/apex/images/* $CATALINA_HOME/webapps/i/

Step 2: Deploy ORDS WAR File

Copy the ORDS application archive to Tomcat:

cp /u01/ords/ords.war $CATALINA_HOME/webapps/

Step 3: Manage Tomcat Service

Start or restart Tomcat to deploy ords.war:

# Stop Tomcat
$CATALINA_HOME/bin/shutdown.sh
# Start Tomcat
$CATALINA_HOME/bin/startup.sh

#Verify Tomcat is running:
ps -ef | grep tomcat

To verify and unlock the actual ORDS-managed schema accounts, run:

-- Check the status of actual ORDS runtime accounts
SELECT username, account_status
FROM dba_users
WHERE username LIKE 'ORDS_%';
-- Unlock and set passwords for the generated ORDS users
ALTER USER ORDS_METADATA IDENTIFIED BY "Pass" ACCOUNT UNLOCK;
ALTER USER ORDS_PUBLIC_USER IDENTIFIED BY "Pass" ACCOUNT UNLOCK;

5. Verification

Access APEX through your browser using your Tomcat host and port (default 8080):

  • APEX Administration Services: http://<hostname>:8080/ords/apex_admin
  • APEX Workspace Login: http://<hostname>:8080/ords

--

--

Foyez Ahmed Rony
Foyez Ahmed Rony

Database Administrator | OCA | OCP