ORDS Standalone Install

Pre-Requisites

Tomcat 8.5 needs Java 7 or later. Tomcat 9 needs Java 8 or later
Not required for "Standalone" installation.
For the Embedded PL/SQL gateway it is recommended that the HTTP Port is set to 0. However, as long as the port is not the same as the port used by Apache Tomcat then it can, technically, run alongside Tomcat.

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

NOTE: These steps assume you have downloaded the ORDS installation zip file to /u01/img/ordsNOTE: The steps below should be performed as 'oracle' for standalone mode or 'tomcat' for Tomcat deployment.

mkdir /u01/app/ords

unzip /u01/img/ords/ords*.zip -d /u01/app/ords

mkdir -p /u01/app/ords/conf

NOTE: If you have attempted to install ORDS before then you should clear down /u01/app/ords/conf (rm -rf /u01/app/ords/conf) to avoid issues...

vi /u01/app/ords/params/ords_params.properties

NOTE: where accounts exist you should specify their existing password. For new accounts the password you specify will be set.

File Content

db.connectionType=basic

db.hostname=delphi

db.port=1523

db.servicename=ORCL3

#cdb.common.schema=false

#db.serviceNameSuffix=.your_db_domain

db.username=APEX_PUBLIC_USER

db.password=APUpassword

migrate.apex.rest=false

plsql.gateway.add=true

rest.services.apex.add=true

rest.services.ords.add=true

schema.tablespace.default=SYSAUX

schema.tablespace.temp=TEMP

standalone.mode=true

#standalone.use.https=true

standalone.http.port=8181

standalone.static.images=/u01/img/apex/5.0.4/apex/images

user.apex.listener.password=APXLpassword

user.apex.restpublic.password=OPpassword

user.public.password=PUBpassword

user.tablespace.default=SYSAUX

user.tablespace.temp=TEMP

sys.user=SYS

sys.password=SYSpassword

restEnabledSql.active=true

feature.sdw=true

Guidance Notes

basic uses service:hostname:port JDBC connect format

hostname

port

service

CDB only

CDB only

PL/SQL gateway username. For APEX must be APEX_PUBLIC_USER

Password for APEX_PUBLIC_USER

Migrate APEX RESTful Services defs to ORDS schema.

Configure ORDS for APEX.

Configure ORDS for APEX RESTful Services.

Install the ORDS schema.

ORDS_METADATA default tablespace (must exist)

ORDS_METADATA temp tablespace (must exist)

Use the WAS (Jetty) included with ORDS.

SSL only

Standalone HTTP Port

Location of APEX images

Specifies password for APEX_LISTENER

Specifies password for APEX_REST_PUBLIC_USER.

Specifies password for ORDS_PUBLIC_USER.

ORDS_PUBLIC_USER default tablespace (must exist)

ORDS_PUBLIC_USER temp tablespace (must exist)

SYS user

SYS password

Specifies if REST-Enabled SQL is enabled.

Enable SQL Developer Web (19.4+) - needs REST enabled SQL

NOTE: Remember to open the standalone.http.port in your firewall

cd /u01/app/ords

java -jar ords.war configdir /u01/app/ords/conf

java -jar ords.war

Wait for output to show an INFO message that ORDS is started,NOTE: assumes java is in your PATH (tested with openjdk 11.0.7 2020-04-14 LTS on Ubuntu 18.04 and OracleJDK 1.8.0_241 on AIX 7.1)Use Ctrl-C to terminate the ORDS process when you are done. To run in the background see the Startup Script instructions below.

In a browser, test that ORDS is working, e.g.

http://delphi:8181

Startup Script

mkdir -p /u01/dba/ords/logs

mkdir -p /u01/dba/ords/scripts

Create a script called start_ords.sh in /u01/dba/ords/scripts...

vi /u01/dba/ords/scripts/start_ords.sh

#!/bin/sh

export PATH=/usr/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH

export JAVA_HOME=/usr

LOGFILE=/u01/dba/ords/logs/ords-$(date +"%Y""%m""%d").log

cd /u01/app/ords

export JAVA_OPTIONS="-Dorg.eclipse.jetty.server.Request.maxFormContentSize=3000000"

nohup $JAVA_HOME/bin/java ${JAVA_OPTIONS} -jar ords.war standalone >> $LOGFILE 2>&1 &

echo "View log file with : tail -f $LOGFILE"

Update your JAVA_HOME as necessary (use which java | sed -e 's/\/bin\/java//' to help identify this).

chmod 700 /u01/dba/ords/scripts/start_ords.sh

Shutdown Script

Create a script called stop_ords.sh in /u01/dba/ords/scripts...

vi /u01/dba/ords/scripts/stop_ords.sh

#!/bin/sh

export PATH=/usr/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH

kill $(ps -ef | grep ords.war | grep -v grep | awk '{print $2}')


chmod 700 /u01/dba/ords/scripts/stop_ords.sh

APEX Static Images

If you are using ORDS to access APEX you may see a warning related to "Static Images" when you login to APEX. To address this...

Check..

/u01/app/ords/conf/ords/standalone/standalone.properties

Confirm that you see entries like this...

standalone.static.context.path=/i

standalone.static.do.not.prompt=true

standalone.static.path=/u01/img/apex/5.0.4/apex/images

If the entries are there, ORDS has been restarted since they were entered, and the issue is still happening, it is likely that RESTful Services are not configured. To configure them...

cd ${APXDIR}

sqlplus / as sysdba

@apex_rest_config.sql

You will be prompted for passwords for APEX_LISTENER and APEX_REST_PUBLIC_USER