ORDS Tomcat Install (22.2+)
Assumptions
Oracle Database 11.1 or later
ORDS 22.1 or later
Java 11 or 17
NOTE: These instructions were tested in an environment with Tomcat installed on a dedicated application server and an Oracle database installed on a dedicated database server.
NOTE: These instructions use a silent installation method. See the Oracle documentation if you wish to use the "advanced" interactive installation method.
NOTE: The examples in these instructions assume you are installing ORDS for use with APEX. Links are provided in case you wish to enable optional features.
Pre-Requisites
- V1032368.zip (22.3..3.311.1929)
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')
/
Install
Unzip
On Tomcat server...
mkdir /tomcat/ords
unzip /tomcat/ords*.zip -d /tomcat/ords
mkdir -p /tomcat/conf/ords/logs
NOTE: These steps assume you have downloaded the ORDS installation zip file to /tomcatNOTE: The steps below should be performed as 'root'.NOTE: If you have attempted to install ORDS before then you should clear down /tomcat/conf (rm -rf /tomcat/conf) to avoid issues...
echo -e 'export PATH="$PATH:/tomcat/ords/bin"' >> ~/.bash_profile
Multi-Tenant
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
Silent Install
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
Secure SYS Account
On the target database instances...
sqlplus / as sysdba
ALTER USER sys ACCOUNT LOCK;
Mutli-Tenant
ALTER USER sys ACCOUNT LOCK CONTAINER=ALL;
Copy APEX Images
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.
Bibliography
22.3https://www.oracle.com/tools/ords/ords-relnotes-22.3.htmlhttps://docs.oracle.com/en/database/oracle/oracle-rest-data-services/22.3/index.htmlhttps://docs.oracle.com/en/database/oracle/oracle-rest-data-services/22.3/ordig/installing-and-configuring-oracle-rest-data-services.html
22.2https://www.oracle.com/tools/ords/ords-relnotes-222.html
22.1https://oracle-base.com/blog/2022/04/22/oracle-rest-data-services-ords-22-1-all-change/https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-installation-on-tomcat-22-onwardhttps://docs.oracle.com/en/database/oracle/oracle-rest-data-services/22.1/ordig/installing-and-configuring-oracle-rest-data-services.html#GUID-2D13E9CD-EB0C-4CE7-82B8-45BD5C62897B