Introduction
Oracle Application Express (APEX) is a low-code development platform. Installing it correctly takes more than just running the installer. You need the right tablespace configuration, a properly configured ORDS instance, and Java set up correctly, otherwise you'll run into errors later. In this guide, I'll walk through the complete installation process for APEX 23.2. I'll also cover the steps that are easy to get wrong, including how to fix the image directory issue that trips up a lot of first-time installs.
Prerequisites
Before starting, make sure you have the following ready. Skipping any of these is the most common reason the APEX installer fails partway through:
- Oracle Database 19c or later, any edition. APEX 23.2 requires at least this baseline version to install cleanly.
- ORDS 23.3 or later. Older ORDS versions aren't guaranteed to be compatible with APEX 23.2 and can cause the middle tier to fail silently.
- Java 11 or later. ORDS runs on Java, and using an unsupported version is one of the most common causes of ORDS failing to start.
- Minimum 2GB free space for the tablespace and software directory. The installer will fail partway through if it runs out of space mid-install.
- A working TNS entry for your database service. If you're using a PDB, make sure the TNS entry points to the PDB service name, not the CDB, otherwise the install scripts will connect to the wrong container.
Software Download
Download the following before you begin. Make sure the versions match what's listed in Prerequisites, mismatched versions are a common source of installation errors.
Environment Used in This Guide
These are the values used throughout this walkthrough. Swap them for your own hostname, IP, and paths, just keep the same values consistent across every step below, since a mismatch between what you set up here and what you reference later is a common source of confusing errors.
- Hostname: apex
- IP: 192.168.101.7
ORACLE_SID: APEXDB, the database instance APEX is being installed into.- PDB: APEXPDB, the pluggable database that will actually host the APEX schema.
ORACLE_HOME: /u02/app/oracle/product/19c/db_1, the Oracle software home used for all commands in this guide.
Step 1: Create a Dedicated APEX Tablespace
We create a separate tablespace for APEX instead of reusing SYSTEM or SYSAUX. This keeps APEX's schema objects isolated from core database objects. It also makes future upgrades, backups, and troubleshooting much safer.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 APEXPDB READ WRITE NO
SQL> alter session set container=APEXPDB;
Session altered.
SQL> select name from v$datafile;
NAME
-----------------------------------------------------------
/u02/app/oracle/oradata/APEXDB/apexpdb/system01.dbf
/u02/app/oracle/oradata/APEXDB/apexpdb/sysaux01.dbf
/u02/app/oracle/oradata/APEXDB/apexpdb/undotbs01.dbf
/u02/app/oracle/oradata/APEXDB/apexpdb/users01.dbf
SQL> create tablespace APEX232 datafile '/u02/app/oracle/oradata/APEXDB/apexpdb/apex232_01.dbf' size 500m autoextend on;
Tablespace created.
Once this completes, verify the tablespace was created successfully by checking DBA_TABLESPACES. You should see APEX232 listed with the size you specified.
Step 2: Create Required Directories and Extract the Software
Before running any install scripts, we set up separate directories for APEX, ORDS, and Java. Keeping these separate makes it easier to manage each component independently, especially when you need to upgrade one without touching the others.
[oracle@apex oracle]$ mkdir apex23_2
[oracle@apex oracle]$ mkdir java
[oracle@apex oracle]$ mkdir ords
[oracle@apex oracle]$ cd apex23_2
[oracle@apex apex23_2]$ pwd
/u02/app/oracle/apex23_2
[oracle@apex apex23_2]$ ls
apex_23.2.zip
[oracle@apex apex23_2]$ cd ..
[oracle@apex oracle]$ cd ords
[oracle@apex ords]$ pwd
/u02/app/oracle/ords
[oracle@apex ords]$ ls
ords-latest.zip
[oracle@apex ords]$ cd ..
[oracle@apex oracle]$ cd java
[oracle@apex java]$ pwd
/u02/app/oracle/java
[oracle@apex java]$ ls
jdk-17_linux-x64_bin.tar.gz
Step 3: Run the APEX Installation Script
This is the core installation step. The apexins.sql script needs four parameters: the tablespace for the APEX application user, the tablespace for APEX files, the temporary tablespace, and the virtual image directory.
Syntax: @apexins.sql tablespace_apex tablespace_files tablespace_temp images
apexins.sql: the script that runs the APEX installation.tablespace_apex: the name of the tablespace for the APEX application user.tablespace_files: the name of the tablespace for the APEX files user.tablespace_temp: the name of the temporary tablespace or tablespace group.images: the virtual directory for APEX images. Using/i/here is important, it's the Oracle-recommended default and keeps future APEX upgrades simple, since Oracle's documentation and upgrade scripts assume this path.
[oracle@apex apex]$ pwd
/u02/app/oracle/apex23_2/apex
[oracle@apex apex]$
[oracle@apex apex]$ sqlplus / as sysdba
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 APEXPDB READ WRITE NO
SQL> alter session set container=APEXPDB;
Session altered.
SQL> @apexins.sql APEX232 APEX232 TEMP /i/
...set_appun.sql
PL/SQL procedure successfully completed.
...set_ufrom_and_upgrade.sql
PL/SQL procedure successfully completed.
Session altered.
FOO3
------------------------------
install2024-09-25_00-57-26.log
. ORACLE
.
. Oracle APEX Installation.
..........................................
Thank you for installing Oracle APEX 23.2.0
Oracle APEX is installed in the APEX_230200 schema.
The structure of the link to the Oracle APEX administration services is as follows:
http://host:port/ords/apex_admin
The structure of the link to the Oracle APEX development interface is as follows:
http://host:port/ords
timing for: Phase 3 (Switch)
Elapsed: 0.40
timing for: Complete Installation
Elapsed: 10.10
SYS> @apxchpwd.sql
...set_appun.sql
================================================================================
This script can be used to change the password of an Oracle APEX
instance administrator. If the user does not yet exist, a user record will be
created.
================================================================================
Enter the administrator's username [ADMIN]
User "ADMIN" does not yet exist and will be created.
Enter ADMIN's email [ADMIN] youremail@mail.com
Enter ADMIN's password []
Created instance administrator ADMIN.
SYS> @apex_rest_config.sql
Enter a password for the APEX_LISTENER user []
Enter a password for the APEX_REST_PUBLIC_USER user []
...set_appun.sql
...setting session environment
...create APEX_LISTENER and APEX_REST_PUBLIC_USER users
...grants for APEX_LISTENER and ORDS_METADATA user
Important: when prompted for the ADMIN password, choose a strong password and store it securely. Share it with your application team, since it's needed to log into the APEX administration interface later.
Step 4: Verify the Installed Users and APEX Version
Once installation finishes, it's worth confirming everything installed correctly before moving on. Checking dba_users confirms the APEX-related accounts exist, and checking apex_release confirms you're actually running 23.2.0 and not an older cached version. Skipping this check is a common reason people troubleshoot the wrong version later.
SYS> set lines 333 pages 333
SYS> col username for a30
SYS> col account_status for a30
SYS> select username, account_status from dba_users where username like '%APEX%';
USERNAME ACCOUNT_STATUS
------------------------------ ------------------------------
APEX_LISTENER OPEN
APEX_PUBLIC_USER LOCKED
APEX_REST_PUBLIC_USER OPEN
APEX_230200 LOCKED
SYS> alter user APEX_PUBLIC_USER identified by "YourP@ssw0rd" account unlock;
SYS> alter user APEX_230200 identified by "YourP@ssw0rd" account unlock;
SYS> select username, account_status from dba_users where username like '%APEX%';
USERNAME ACCOUNT_STATUS
------------------------------ ------------------------------
APEX_LISTENER OPEN
APEX_PUBLIC_USER OPEN
APEX_REST_PUBLIC_USER OPEN
APEX_230200 OPEN
SYS> col VERSION_NO for a20
SYS> col API_COMPATIBILITY for a20
SYS> col PATCH_APPLIED for a20
SYS> select * from apex_release;
VERSION_NO API_COMPATIBILITY PATCH_APPLIED
-------------------- -------------------- --------------------
23.2.0 2023.10.31 APPLIED
Note: unlock and set real, unique passwords for APEX_PUBLIC_USER and the APEX schema account here. Don't reuse the example password shown above.
Step 5: Configure the Bash Profile
ORDS and APEX both rely on environment variables like ORACLE_HOME, JAVA_HOME, and TNS_ADMIN being set correctly in the OS user's shell profile. If these aren't set, ORDS will fail to start or won't be able to find your database, and the error messages you get usually don't make that obvious. Setting this up correctly now saves troubleshooting time later.
[oracle@apex ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_HOME=/u02/app/oracle/product/19c/db_1
export ORACLE_HOME
ORACLE_BASE=/u02/app/oracle
export ORACLE_BASE
ORACLE_SID=apexdb
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH
TNS_ADMIN=${ORACLE_HOME}/network/admin
export TNS_ADMIN
JAVA_HOME=/u02/app/oracle/java/jdk-17.0.12
export JAVA_HOME
ORDS_HOME=/u02/app/oracle/ords
export ORDS_HOME
PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$ORDS_HOME/bin:$PATH:.
export PATH
[oracle@apex ~]$ . .bash_profile
[oracle@apex ~]$ java -version
java version "17.0.12" 2024-07-16 LTS
Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.12+8-LTS-286, mixed mode, sharing)
[oracle@apex ~]$
Step 6: Copy the APEX Images Directory to ORDS
APEX's front-end assets, CSS, JavaScript, and images, need to be accessible to ORDS separately from the database. This step copies those files over. Missing this step is exactly what causes the image directory issue covered further down.
[oracle@apex apex]$ pwd
/u02/app/oracle/apex23_2/apex
[oracle@apex apex]$
[oracle@apex apex]$ cp -r images/ /u02/app/oracle/ords/
[oracle@apex apex]$
Step 7: Install ORDS
This step installs and configures ORDS itself, which acts as the middle tier between your browser and the APEX schema in the database. The first run walks through an interactive setup for your database connection pool.
[oracle@apex ords]$ pwd
/u02/app/oracle/ords
[oracle@apex ords]$ mkdir config
[oracle@apex ords]$ java -jar ords.war --config /u02/app/oracle/ords/config install
Warning: Support for executing: java -jar ords.war has been deprecated.
Please add ords to your PATH and use the ords command instead.
Run the following command to add ords to your PATH:
echo -e 'export PATH="$PATH:/u02/app/oracle/ords/bin"' >> ~/.bash_profile
Start a new shell to pick up this change.
2024-09-24T21:15:26.438Z WARNING Your configuration folder /u02/app/oracle/ords/config is located in ORDS product folder. Oracle recommends to use a different configuration folder.
Refer to Oracle REST Data Services Documentation on how to setup your configuration folder.
ORDS: Release 24.2 Production on Wed Sep 25 02:45:26 2024
Copyright (c) 2010, 2024, Oracle.
Configuration:
/u02/app/oracle/ords/config
Oracle REST Data Services - Interactive Install
...
Mapped local pools from /u02/app/oracle/ords/config/databases:
/ords/ => default => VALID
2024-09-24T21:17:44.394Z INFO Oracle REST Data Services initialized
Oracle REST Data Services version : 24.2.3.r2011847
Oracle REST Data Services server info: jetty/10.0.21
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 17.0.12+8-LTS-286
At this point the installer will appear stuck since ORDS is now running in the foreground. This is expected. Wait a moment, then exit with Ctrl+C or Ctrl+Z. After that, stop the running ORDS process:
ps -ef | grep ords
kill -9 "pid"
Step 8: Verify the ORDS Database Users
Before starting ORDS as a service, confirm the ORDS-related schema users were created and unlocked correctly. If ORDS_PUBLIC_USER or ORDS_METADATA aren't open, ORDS won't be able to connect to the database at all.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 APEXPDB READ WRITE NO
SQL> alter session set container=APEXPDB;
SQL> select username, account_status from dba_users where username like '%ORDS%';
USERNAME ACCOUNT_STATUS
------------------------------ ------------------------------
ORDS_PUBLIC_USER OPEN
ORDS_METADATA OPEN
ORDSYS LOCKED
Step 9: Start ORDS as a Background Service
Now that configuration is verified, start ORDS properly using nohup so it keeps running after you log out of the session.
nohup ords --config /u02/app/oracle/ords/config serve &
Step 10: Access APEX Through the Browser
With ORDS running, APEX should now be reachable through your browser at the URLs below. If these load correctly, the installation is complete.
http://192.168.101.7:8080/ords/
http://192.168.101.7:8080/ords/apex_admin
APEX Home
Workspace Login
APEX Admin Login
Admin Home
Manage Workspace
Troubleshooting: Image Directory Issue
When trying to log into APEX, you might get the following error:
| There is a problem with your environment because the Oracle APEX files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is /i/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it. |
This happens when the image prefix hasn't been pointed to a valid location. Here's how to fix it:
SQL> set lines 333 pages 333
SQL> col NAME for a30
SQL> col VALUE for a60
SQL> select * from apex_instance_parameters where name='IMAGE_PREFIX';
NAME VALUE CREATED_O LAST_UPDA
------------------------------ ------------------------------------------------------------ --------- ---------
IMAGE_PREFIX /i/ 25-SEP-24 25-SEP-24
SQL> begin
apex_instance_admin.set_parameter(p_parameter=>'IMAGE_PREFIX', p_value=>'https://static.oracle.com/cdn/apex/23.2.0/');
commit;
end;
/
PL/SQL procedure successfully completed.
SQL> select * from apex_instance_parameters where name='IMAGE_PREFIX';
NAME VALUE CREATED_O LAST_UPDA
------------------------------ ------------------------------------------------------------ --------- ---------
IMAGE_PREFIX https://static.oracle.com/cdn/apex/23.2.0/ 25-SEP-24 25-SEP-24
Note that the value https://static.oracle.com/cdn/apex/23.2.0/ is specific to version 23.2. Use the correct CDN path for whichever APEX version you're installing.
What Next --> APEX Upgradation
Thank you for reading!
I hope this content has been helpful to you. Your feedback and suggestions are always welcome. Feel free to leave a comment or reach out with any queries.
Abhishek Shrivastava
Oracle DBA with hands-on experience managing production Data Guard, RAC, GoldenGate, and APEX environments. I write practical, tested installation and troubleshooting guides based on real deployment work.






Comments
Post a Comment