Install Oracle APEX 21 with standalone ORDS

This article presents how to install and configure Apex 21.2 with standalone ORDS 21.2

Prerequisite

Apex requires Oracle database with listener. You can find all the steps in following article:

Install Oracle Database 21C using rpm on OEL8

It configures:

  • host: oel8.dbaora.com
  • database listener: LISTENER with port :1521
  • multitenant database ORCLCDB with single pluggable database orclpdb1.

Apex will be installed in pluggable database orclpdb1

Download software to installation

!!! NOTE !!! – all next steps are executed as OS user oracle

Download Apex installation package apex_21.2.zip from Oracle site and copy it to /home/oracle

https://www.oracle.com/tools/downloads/apex-downloads.html

Download REST Data Service package ords-21.4.2.062.1806.zip from Oracle site and copy it to /home/oracle/

https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html

Configure Apex in database for ords

Apex package

cd /home/oracle
unzip apex_21.2.zip

Once unzip is completed a new directory will be created /home/oracle/apex so go to this directory

cd /home/oracle/apex

In this directory there are 3 important files:

  • apexins.sql – install apex in database
  • apxchpwd.sql – change password for main apex user ADMIN
  • apex_rest_config.sql – configures ords in database

Logon to database as SYSDBA and switch to pluggable database orclpdb1 and run installation script. You can install apex on dedicated tablespaces if required.

sqlplus / as sysdba
alter session set container=orclpdb1;
@apexins.sql SYSAUX SYSAUX TEMP /i/
Description of the command:

@apexins.sql tablespace_apex tablespace_files tablespace_temp images

tablespace_apex - name of the tablespace for APEX user.

tablespace_files - name of the tablespace for APEX files user.

tablespace_temp - name of the temporary tablespace.

images - virtual directory for APEX images.
Define the virtual image directory as /i/ for future updates.

In the end of installation output in sqlplus you can see links to your apex, ords and next steps. Right now no link would work without ords.

Thank you for installing Oracle Application Express 21.2.0

Oracle Application Express is installed in the APEX_210200 schema.

The structure of the link to the Application Express
administration services is as follows:
http://host:port/ords/apex_admin

The structure of the link to the Application Express
development interface is as follows:
http://host:port/ords

Next Steps:

1. Create your Instance Administration Account
Run the apxchpwd.sql script

2. Configure the APEX_PUBLIC_USER Account
See the Installation Guide for details

3. Configure RESTful Services
Run the apex_rest_config.sql script

When Oracle Application Express installs, it creates three new database accounts all with status LOCKED in database:

  • APEX_210200– The account that owns the Oracle Application Express schema and metadata.
  • FLOWS_FILES – The account that owns the Oracle Application Express uploaded files.
  • APEX_PUBLIC_USER – The minimally privileged account is used for Oracle Application Express configuration with ORDS.

Create and change password for ADMIN account. When prompted enter a password for the ADMIN account.

sqlplus / as sysdba
alter session set container=orclpdb1;

@apxchpwd.sql

output

SQL> @apxchpwd.sql
...set_appun.sql
================================================================================
This script can be used to change the password of an Application Express
instance administrator. If the user does not yet exist, a user record will be
created.
================================================================================
Enter the administrator's username [ADMIN]
User "ADMIN" does not yet exist and will be created.
Enter ADMIN's email [ADMIN]
Enter ADMIN's password []
Created instance administrator ADMIN.

Configure RESTful Services. When prompted enter a password for the APEX_LISTENER, APEX_REST_PUBLIC_USER account.

sqlplus / as sysdba
alter session set container=orclpdb1;

@apex_rest_config.sql

output

SQL> @apex_rest_config.sql

Enter a password for the APEX_LISTENER user []
Enter a password for the APEX_REST_PUBLIC_USER user []
...set_appun.sql
...setting session environment
...create APEX_LISTENER and APEX_REST_PUBLIC_USER users
...grants for APEX_LISTENER and ORDS_METADATA user

as last step you can modify again passwords for 3 users:

ALTER USER apex_public_user IDENTIFIED BY Dbaora$ ACCOUNT UNLOCK;
ALTER USER apex_listener IDENTIFIED BY Dbaora$ ACCOUNT UNLOCK;
ALTER USER apex_rest_public_user IDENTIFIED BY Dbaora$ ACCOUNT UNLOCK;

Configure startup standalone ORDS

Create directory /home/oracle/ords for ords software and unzip it

mkdir /home/oracle/ords
cp ords-21.4.2.062.1806.zip /home/oracle/ords
cd /home/oracle/ords
unzip ords-21.4.2.062.1806.zip

Create configuration directory /home/oracle/ords/conf for ords standalone

mkdir /home/oracle/ords/conf

You should see following in /home/oracle/ords

[oracle@oel8 ords]$ pwd
/home/oracle/ords

[oracle@oel8 ords]$ ls
conf docs examples FUTC.txt index.html license.txt ords-21.4.2.062.1806.zip ords.war params scripts

Setup basic parameters file /home/oracle/ords/params/ords_params.properties

#
db.hostname=oel8.dbaora.com
db.port=1521
db.servicename=orclpdb1
#db.sid=
db.username=APEX_PUBLIC_USER
migrate.apex.rest=false
rest.services.apex.add=true
rest.services.ords.add=true
schema.tablespace.default=SYSAUX
schema.tablespace.temp=TEMP
standalone.http.port=8080
standalone.static.images=/home/oracle/apex/images
user.tablespace.default=SYSAUX
user.tablespace.temp=TEMP

Run ords first time you are asked for:

  • directory to save configuration: /home/oracle/ords/conf
  • password for ORDS_PUBLIC_USER(be created): Dbaora$
  • administrator user: SYS
  • password for SYS AS SYSDBA: !!! you must know it from your DBA !!!
  • use PL/SQL Gateway or not:  1 for yes
  • password for APEX_PUBLIC_USER: Dbaora$
  • password for APEX_LISTENER: Dbaora$
  • feature to enable: 1 for SQL Developer Web (Enables all features)
  • wish to start in standalone mode: 1 for standalone mode
[oracle@oel8 ords]$ java -jar ords.war
This Oracle REST Data Services instance has not yet been configured.
Please complete the following prompts
Enter the location to store configuration data: /home/oracle/ords/conf
Enter the database password for ORDS_PUBLIC_USER:
Confirm password:
Requires to login with administrator privileges to verify Oracle REST Data Services schema.

Enter the administrator username:sys
Enter the database password for SYS AS SYSDBA:
Confirm password:
Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//oel8.dbaora.com:1521/orclpdb1

Retrieving information.
Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.
If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:
Enter the database password for APEX_PUBLIC_USER:
Confirm password:
Enter the database password for APEX_LISTENER:
Confirm password:
Enter the database password for APEX_REST_PUBLIC_USER:
Confirm password:
Enter a number to select a feature to enable:
[1] SQL Developer Web (Enables all features)
[2] REST Enabled SQL
[3] Database API
[4] REST Enabled SQL and Database API
[5] None
Choose [1]:1
2022-03-19T18:40:34.543Z INFO reloaded pools: []
Installing Oracle REST Data Services version 21.4.2.r0621806
... Log file written to /home/oracle/ords_install_core_2022-03-19_194034_00664.log
... Verified database prerequisites
... Created Oracle REST Data Services proxy user
... Created Oracle REST Data Services schema
... Granted privileges to Oracle REST Data Services
... Created Oracle REST Data Services database objects
... Log file written to /home/oracle/ords_install_datamodel_2022-03-19_194044_00387.log
... Log file written to /home/oracle/ords_install_scheduler_2022-03-19_194045_00075.log
... Log file written to /home/oracle/ords_install_apex_2022-03-19_194046_00484.log
Completed installation for Oracle REST Data Services version 21.4.2.r0621806. Elapsed time: 00:00:12.611

Enter 1 if you wish to start in standalone mode or 2 to exit [1]:1
Enter 1 if using HTTP or 2 if using HTTPS [1]:
Choose [1]:1

As a result ORDS will be running in standalone mode and configured so you can try to logon to apex.

After reboot of machine start ORDS in standalone mode in background as following:

cd /home/oracle/ords
java -jar ords.war standalone &

Verify APEX is working

Administration page

http://hostname:port/ords

In this case

http://oel8.dbaora.com:8080/ords 

Logon as ADMIN user to INTERNAL workspace

and start building APEX world 🙂

Have a fun 🙂

Tomasz

3 thoughts on “Install Oracle APEX 21 with standalone ORDS

  1. @apexins.sql apex apex temp /i/

    Greetings,

    I have these warning messages for users ORDS_PUBLIC_USER, APEX_LISTENER and APEX_REST_PUBLIC_USER:

    2022-06-10T16:27:32.318Z WARNING *** jdbc.MaxLimit in configuration |apex|| is using a value of 10, this setting may not be sized adequately for a production environment ***
    2022-06-10T16:27:32.318Z WARNING *** jdbc.InitialLimit in configuration |apex|| is using a value of 3, this setting may not be sized adequately for a production environment ***
    2022-06-10T16:27:33.059Z INFO Configuration properties for: |apex|pu|
    db.servicename=sevhr
    db.hostname=svora12c.micasa.com.co
    restEnabledSql.active=true
    db.password=******
    resource.templates.enabled=true
    db.port=1521
    security.requestValidationFunction=wwv_flow_epg_include_modules.authorize
    feature.sdw=true
    security.validationFunctionType=plsql
    db.connectionType=basic
    database.api.enabled=true
    db.username=ORDS_PUBLIC_USER

    2022-06-10T16:27:33.387Z WARNING *** jdbc.MaxLimit in configuration |apex|rt| is using a value of 10, this setting may not be sized adequately for a production environment ***
    2022-06-10T16:27:33.387Z WARNING *** jdbc.InitialLimit in configuration |apex|rt| is using a value of 3, this setting may not be sized adequately for a production environment ***
    2022-06-10T16:27:35.092Z INFO Oracle REST Data Services initialized
    Oracle REST Data Services version : 21.4.2.r0621806
    Oracle REST Data Services server info: jetty/9.4.44.v20210927

  2. Hello. This guide is well written. Thanks for sharing.

    I do want to ask about your choice of installation directories being created out of /home/oracle. Services, such as ORDS, will run out of the Oracle user’s directory. Do you think it would be more OFA compliant to install everything (APEX, ORDS) under something like /u01/app/oracle?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.