Oracle REST Data Services (ORDS) : Standalone Mode (ORDS Versions 3.0 to 21.4)
This article provides an overview of using Oracle REST Data Services (ORDS) in standalone mode.
oracle miscconfigurationintermediate
by OracleDba
21 views
This article provides an overview of using Oracle REST Data Services (ORDS) in standalone mode.
123456789101112131415161718192021222324252627282930313233
# Standalone HTTP
standalone.mode=true
standalone.http.port=8080
standalone.static.path=/home/oracle/apex/images
# Standalone HTTPS - Auto SSL
standalone.mode=true
standalone.use.https=true
standalone.https.port=8443
standalone.static.path=/home/oracle/apex/images
# Standalone HTTPS - Certificate
standalone.mode=true
standalone.use.https=true
standalone.https.port=8443
standalone.ssl.host=localhost.localdomain
standalone.static.path=/home/oracle/apex/images
standalone.use.ssl.cert=true
standalone.ssl.cert.path=/home/oracle/keystore/localhost.der
standalone.ssl.key.path=/home/oracle/keystore/localhost-key.der
# ORDS19 Onward
standalone.static.path=/home/oracle/apex/images
# Pre-ORDS19
standalone.static.images=/home/oracle/apex/images
/u01/ords/conf/ords/standalone/standalone.properties
# HTTP
http://ol7-121.localdomain:8080
# HTTPS
http://ol7-121.localdomain:8443123456789101112131415161718192021
cd /u01/ords
$JAVA_HOME/bin/java -jar ords.war standalone
#!/bin/bash
export PATH=/usr/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH
export JAVA_HOME=/usr
LOGFILE=/home/oracle/scripts/logs/ords-`date +"%Y""%m""%d"`.log
cd /u01/ords
export JAVA_OPTIONS="-Dorg.eclipse.jetty.server.Request.maxFormContentSize=3000000 -Duser.timezone=UTC"
nohup $JAVA_HOME/bin/java ${JAVA_OPTIONS} -jar ords.war standalone >> $LOGFILE 2>&1 &
echo "View log file with : tail -f $LOGFILE"
#!/bin/bash
export PATH=/usr/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH
kill `ps -ef | grep ords.war | awk '{print $2}'`
mkdir -p ~/scripts/logs
chmod u+x ~/scripts/*.sh
~/scripts/stop_ords.sh
~/scripts/start_ords.sh1234567
jetty.secure.port=8443
ssl.cert=
ssl.cert.key=
ssl.host=
~/scripts/stop_ords.sh
~/scripts/start_ords.sh123456789101112131415161718192021222324252627282930313233343536
mkdir ~/keystore
cd ~/keystore
# Create a self-signed certificate in a JKS keystore.
$JAVA_HOME/bin/keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks \
-dname "CN=`hostname`, OU=Example Department, O=Example Company, L=Birmingham, ST=West Midlands, C=GB" \
-storepass password1 -validity 3600 -keysize 2048 -keypass password1
# Create a PKCS12 keystore from the JKS keystore.
$JAVA_HOME/bin/keytool -importkeystore -srckeystore keystore.jks -srcalias selfsigned -srcstorepass password1 \
-destkeystore keystore.p12 -deststoretype PKCS12 -deststorepass password1 -destkeypass password1
# Extract the key and certificate in PEM format.
openssl pkcs12 -in keystore.p12 -nodes -nocerts -out `hostname`-key.pem
openssl pkcs12 -in keystore.p12 -nokeys -out `hostname`.pem
# Convert them to DER format.
openssl pkcs8 -topk8 -inform PEM -outform DER -in `hostname`-key.pem -out `hostname`-key.der -nocrypt
openssl x509 -inform PEM -outform DER -in `hostname`.pem -out `hostname`.der
$ ls *.der
ol7-121.localdomain.der ol7-121.localdomain-key.der
$
# SSL Confile
jetty.secure.port=8443
ssl.cert=/home/oracle/keystore/ol7-121.localdomain.der
ssl.cert.key=/home/oracle/keystore/ol7-121.localdomain-key.der
ssl.host=ol7-121.localdomain
~/scripts/stop_ords.sh
~/scripts/start_ords.sh
tail -f ~/scripts/logs/ords-`date +"%Y""%m""%d"`.log
https://ol7-121.localdomain:8443123456
standalone.static.context.path=/i
standalone.static.do.not.prompt=true
standalone.static.path=/home/oracle/apex/images
~/scripts/stop_ords.sh
~/scripts/start_ords.sh123456
standalone.doc.root=/home/oracle/ords-3.0.9-conf/ords/standalone/doc_root
mkdir -p /u01/ords/conf/ords/standalone/doc_root
~/scripts/stop_ords.sh
~/scripts/start_ords.sh1234567
<entry key="error.externalPath">/home/oracle/error-pages/</entry>
echo "404 Error: Whoops" > /home/oracle/error-pages/404.html
echo "500 Error: Whoops" > /home/oracle/error-pages/500.html
~/scripts/stop_ords.sh
~/scripts/start_ords.sh1234567891011121314151617181920212223242526272829
mkdir -p /u01/ords/conf/ords/standalone/etc
mkdir -p /u01/ords/conf/ords/standalone/logs
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Ref id="Handlers">
<Call name="addHandler">
<Arg>
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
<Set name="filename"><Property name="jetty.logs" default="/u01/ords/conf/ords/standalone/logs/"/>ords-access-yyyy_mm_dd.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">false</Set>
<Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</New>
</Arg>
</Call>
</Ref>
</Configure>
~/scripts/stop_ords.sh
~/scripts/start_ords.shPlease to add comments
No comments yet. Be the first to comment!