In this Blog, we will be configuring an application server for APEX 22.1 using ORDS 22.2.
Pre-requisites:
Required Software:
Additional Files:
Installing Oracle REST Data Services
Step 1:
As root user verify Java Version.
$ java -version
If no version found or unsupported version is found install java 11 as root user:
$ yum install java-11-openjdk-devel
Step 2:
Download and install ORDS as root user.
$ yum install ords
Additional Information:
NOTE: If ords is not available on the repository for download or an old version gets downloaded run the update command as root and try Step 2 again:
$ yum update
Step 3:
Import APEX 22.2 images folder into your desired location. We recommend to do it in the following path: /u01/app/oracle/apex/apex_22.1/images.
Configuring ORDS 22.2
Now we have ORDS installed we will proceed to configure it with our database system. This version of ORDS will run in standalone mode and using Jetty instead of Tomcat like in previous releases.
We can use any configuration path we want, for this exercise we will use /etc/ords/config.
$ ords --config /etc/ords/config install
Follow the interactive install steps
Enter a number to select the type of installation
[1] Install or upgrade ORDS in the database only
[2] Create or update a database pool and install/upgrade ORDS in the database
[3] Create or update a database pool only
Choose [2]
Enter a number to select the database connection type to use
[1] Basic (host name, port, service name)
[2] TNS (TNS alias, TNS directory)
[3] Custom database URL
Choose [1]
Enter the database host name [localhost]:
Enter the database listen port [1521]:
Enter the database service name [orcl]:
Provide database user name with administrator privileges.
Enter the administrator username: sys as sysdba
Enter the database password for sys as sysdba:
Connecting to database user: sys as sysdba url: jdbc:oracle:thin:@//localhost:1521/orcl
Enter a number to select additional feature(s) to enable:
[1] Database Actions (Enables all features)
[2] REST Enabled SQL and Database API
[3] REST Enabled SQL
[4] Database API
[5] None
Choose [1]:
Enter a number to configure ORDS for standalone mode
[1] Configure ORDS for standalone mode
[2] Skip
Choose [1]:
Enter a number to use HTTP or HTTPS protocol
[1] HTTP
[2] HTTPS
Choose [1]:
Enter the HTTP port [8080]:
Enter the APEX static resources location: /u01/app/oracle/apex/apex_22.1/images
The interactive Install will test the database connection and will create a new user called ORDS_PUBLIC_USER, you will be asked to put a password to it.
Last Step before running ORDS
Now we have our ORDS configured to serve our database system and our APEX we have to open port 8080 through the instance firewall (this is additional to have the ports added to the VCN attached to this instance).
As root user run the following:
$ firewall-cmd --zone=dmz --add-port=8080/tcp --permanent
$ firewall-cmd --reload
Test ORDS 22.x
As root user run the following
$ ords --config /etc/ords/config serve --apex-images /u01/oracle/apex_22.1/images
ORDS should run smoothly and should be accessible through the browser.
Additional Sources: