Go to home directory:
cd ~Download the latest APEX distribution (overwrite if file exists):
curl -L -o apex-latest.zip https://download.oracle.com/otn_software/apex/apex-latest.zipBackup existing folder (if present):
mv apex-latest apex-latest.bak_$(date +%Y%m%d_%H%M%S) 2>/dev/nullUnzip into a clean directory:
mkdir -p ~/apex-latest
unzip apex-latest.zip -d ~/apex-latestSwitch to APEX root:
cd ~/apex-latest/apex/home/oracle/apex folder in the VM — it may not contain a full or valid APEX distribution.
Use either sql (preferred in newer environments) or sqlplus:
sql / as sysdbaThen:
alter session set container = FREEPDB2;Run the silent installer:
@apxsilentins.sql SYSAUX SYSAUX TEMP /i/ oracle oracle oracle oracleThe installer creates log files in the current directory, e.g.:
configureYYYY-MM-DD_HH-MM-SS.log
installYYYY-MM-DD_HH-MM-SS.log
Check both for errors:
grep -E "SP2-|ORA-" install*.log
grep -E "SP2-|ORA-" configure*.logIf anything is returned → installation is not valid.
If login fails or admin creation fails due to password policy, run:
@apxchpwd.sqlThen log in:
- Workspace:
INTERNAL - User:
ADMIN
(Optional, for lab use):
begin
apex_instance_admin.set_parameter('PASSWORD_MIN_LENGTH', 6);
apex_instance_admin.set_parameter('PASSWORD_COMPLEXITY_CHECK', 'N');
commit;
end;
/Backup config:
cp -a /home/oracle/ords_config /home/oracle/ords_config.bak_$(date +%Y%m%d_%H%M%S)Run ORDS installer:
/home/oracle/ords/bin/ords --config /home/oracle/ords_config installChoose:
- Create or update a database pool
- Create additional database pool
Set:
- Pool name:
ords2 - Connection type:
basic - Host:
localhost - Port:
1521 - Service name:
FREEPDB2 - User:
ORDS_PUBLIC_USER - PL/SQL gateway mode:
proxied
cat /home/oracle/ords_config/databases/ords2/pool.xmlExpected key parameters:
<entry key="db.servicename">FREEPDB2</entry>
<entry key="db.username">ORDS_PUBLIC_USER</entry>
<entry key="plsql.gateway.mode">proxied</entry>pkill -f "ords.war.*serve --port 8080"
nohup /home/oracle/ords/bin/ords \
--config /home/oracle/ords_config \
serve --port 8080 \
--apex-images /home/oracle/apex_images \
>/home/oracle/ords/ords.log 2>&1 &Original PDB:
http://localhost:8080/ords/
New PDB:
http://localhost:8080/ords/ords2/apex
Landing page:
http://localhost:8080/ords/ords2/_/landing
- Do not rely on pre-existing APEX folders in Oracle VM images
- Always validate install logs (
SP2-,ORA-) - APEX install can “complete” while being broken
- ORDS maps PDBs via pools:
/ords/<pool_name>/ - One
apex_imagesdirectory is shared across all PDBs