Oracle Database 11.1 or later
ORDS 22.1 or later
Java 11 or 17
On the target database instances...
For users returned by the following query, make sure the account is unlocked and you know the passwords
SELECT username,
account_status
FROM dba_users
WHERE username IN ('SYS','APEX_LISTENER','APEX_PUBLIC_USER','APEX_REST_PUBLIC_USER','ORDS_PUBLIC_USER')
/
On Tomcat server...
mkdir /tomcat/ords
unzip /tomcat/ords*.zip -d /tomcat/ords
mkdir -p /tomcat/conf/ords/logs
echo -e 'export PATH="$PATH:/tomcat/ords/bin"' >> ~/.bash_profile
If you are installing to a single-tenant architecure or to a CDB, ignore this step. If you are installing to a PDB you can create a user (e.g. ORDS_OWNER) to use for ORDS installation. After creating this user you need to run a script to grant the correct privileges. The script can be found here (copy it to your db server if necessary):
/tomcat/ords/installer/ords_installer_privileges.sql
On Tomcat server...
export ORDS_HOME=/tomcat/ords
export ORDS_CONFIG=/tomcat/conf/ords
export ORDS_LOGS=${ORDS_CONFIG}/logs
export DB_HOSTNAME=mydbhost
export DB_PORT=1521
export DB_SERVICE=myservice
export SYSDBA_USER=SYS
export SYSDBA_PASSWORD=mysyspassword
export ORDS_PASSWORD=myordspassword
${ORDS_HOME}/bin/ords --config ${ORDS_CONFIG} install \
--log-folder ${ORDS_LOGS} \
--admin-user ${SYSDBA_USER} \
--db-hostname ${DB_HOSTNAME} \
--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 \
--proxy-user \
--password-stdin <<EOF
${SYSDBA_PASSWORD}
${ORDS_PASSWORD}
EOF
rsync -iv --stats /tomcat/ords/ords.war /tomcat/latest/webapps
On the target database instances...
sqlplus / as sysdba
ALTER USER sys ACCOUNT LOCK;
Mutli-Tenant
ALTER USER sys ACCOUNT LOCK CONTAINER=ALL;
Copy the APEX images (${APXDIR}/images) to the Tomcat "webapps" directory.
If the Tomcat server and database server are separate hosts (recommended) then you will need to scp the files across.su - root
mkdir /tomcat/latest/webapps/i/
rsync -riv --stats ${APXDIR}/images/* /tomcat/latest/webapps/i/
chown -R tomcat:tomcat /tomcat/latest/webapps/i/
NOTE:
This step needs to be repeated each time you install a new version of APEX or a new version of Tomcat.