ORDS Standalone Install
Pre-Requisites
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
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
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_USERBibliography
https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-standalone-mode
Oracle REST Data Services (ORDS) / APEX Listener General FAQ (Doc ID 1536052.1)How to Configure ORDS to Run APEX and MOD_PLSQL URLs (Doc ID 2228856.1)
Jettyhttps://www.thatjeffsmith.com/archive/2017/06/configuring-jetty-in-standalone-ords/ https://github.com/eclipse/jetty.project/issues/2921 (SSL on AIX)
ORDS Installation, Configuration, and Development Guidehttps://docs.oracle.com/en/database/oracle/oracle-rest-data-services/21.3/aelig/installing-REST-data-services.html (21.3)https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/19.4/aelig/installing-REST-data-services.html (19.4)