Apex, Tomcat, and ORDS Installation Automation using silent method

Introduction:

This document provides steps to easily install Apex, Tomcat, and ORDS on a Linux system.

Step 1: Create a file apex_install_params.txt

1.1. Create a file named `apex_install_params.txt` using a text editor.

1.2. Enter the following database-related information in `apex_install_params.txt`:

export APEX_SCHEMA_DEFAULT=YOUR_DEFAULT_TABLESPACE

export APEX_SCHEMA_TEMP=TEMP_TABLESPACE

export APEX_SYS_PASSWORD=YOUR_SYS_PASSWORD

export APEX_USER_PASSWORD=YOUR_USER_PASSWORD

Step 2: Create a file ords_params.properties

2.1. Create a file named ords_params.properties using a text editor.

2.2. Enter the following database-related information in ords_params.properties:

db.hostname=localhost.localdomain

db.port=1521

db.servicename=pdb1

#db.sid=

db.username=APEX_PUBLIC_USER

db.password=ApexPassword1

migrate.apex.rest=false

plsql.gateway.add=true

rest.services.apex.add=true

rest.services.ords.add=true

schema.tablespace.default=APEX

schema.tablespace.temp=TEMP

standalone.mode=false

#standalone.use.https=true

#standalone.http.port=8080

# ORDS19 Onward

#standalone.static.path=/home/oracle/apex/images

# Pre-ORDS19

#standalone.static.images=/home/oracle/apex/images

user.apex.listener.password=ApexPassword1

user.apex.restpublic.password=ApexPassword1

user.public.password=ApexPassword1

user.tablespace.default=APEX

user.tablespace.temp=TEMP

sys.user=SYS

sys.password=SysPassword1

restEnabledSql.active=false

feature.sdw=false

Step 3: Script for Installing Software

3.1. Edit the script below according to your environment. The script will install Java, ORDS, APEX, and Tomcat.

export JAVA_HOME=PATH TO JAVA

export ORDS_HOME=PATH TO ORDS

export APEX_HOME=PATH TO APEX

export TOMCAT_HOME=PATH TO TOMCAT

3.2 Source DB

source /your_environment.env

3.3 Software unzipping

tar -zvxf /PATH TO JAVA/jdk-13.0.2_linux-x64_bin.tar.gz -C $JAVA_HOME

3.4 Unzip ORDS

unzip /uPATH TO ORDS/ords-20.2.0.178.1804.zip -d $ORDS_HOME

3.5 Unzip APEX

unzip /PATH TO APEX/apex_20.2_en.zip -d $APEX_HOME

3.6 unzip tomcat

unzip /PATH TO TOMCAT/apache-tomcat-9.0.80.zip -d $TOMCAT_HOME

3.7 Source APEX installation parameters

source /apex_install_params.txt

3.8 : Install APEX

cd $APEX_HOME/apex

sqlplus sys/$APEX_SYS_PASSWORD as sysdba @apxsilentins.sql $APEX_SCHEMA_DEFAULT $APEX_SCHEMA_DEFAULT $APEX_SCHEMA_TEMP /i/ $APEX_SYS_PASSWORD $APEX_SYS_PASSWORD $APEX_USER_PASSWORD $APEX_USER_PASSWORD

echo “APEX installation completed.”

# Exit SQL*Plus

sqlplus /nolog <<EOF

exit

EOF

3.8:  Configure ORDS

cd $ORDS_HOME

# Create the ‘conf’ directory with full permissions

mkdir -p $ORDS_HOME/conf

chmod -R 777 $ORDS_HOME/conf

mkdir -p /PATH TO TOMCAT/apache-tomcat-9.0.80/webapps/i

$JAVA_HOME/bin/java -jar ords.war configdir $ORDS_HOME/conf

$JAVA_HOME/bin/java -jar ords.war setup –database october –parameterFile  $ORDS_HOME/ords_params.properties –silent

Step 4: Map the database

$JAVA_HOME/bin/java -jar ords.war map-url –type base-path /october october

Step 5: Copy ORDS to Tomcat webapps

cp $ORDS_HOME/ords.war $TOMCAT_HOME/webapps

Step 6: Copy APEX images to Tomcat

cp -R $APEX_HOME/apex/images/* $TOMCAT_HOME/webapps/i

Step 7: Change the working directory to Tomcat

cd $TOMCAT_HOME/apache-tomcat-9.0.80/bin

chmod -R 777 *

# Start Tomcat

sh startup.sh

RefDoc:

https://docs.oracle.com/en/database/oracle/apex/22.2/htmig/automating-the-apex-installation-process.html#GUID-C18CDE2A-F730-41D5-85DC-FA010A2CFCD4

https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-configure-multiple-databases

Conclusion:

This script automates the installation of Apex, Tomcat, and ORDS on Linux, using predefined parameters for efficient and user-friendly setup. It simplifies the process, referencing Oracle documentation for best practices, and ensures a streamlined deployment with minimal manual intervention.

Recent Posts

Start typing and press Enter to search