Hi guys,
last month I’ve made a APEX installation at a customer where I had to consider several security and high availibility aspects. Therefore the classical setup for a didn’t work and I had to install multple tiers to fulfill all requirements. Because there was a lot of steps to do, I will describe my work in a more briefly manner.
Preface
An Oracle APEX environment can be installed in three common ways:
- Mod/PLSQL Gateway
- Oracle HTTP Server (also known as OHS)
- Oracle REST Data Services (also known as ORDS)
Unfortunately option 1 is not useful when you have an enterprise network, because clients need a directly connection to the Oracle database server. In many companies this is prohibit. Option 2 has three tiers – the client, the OHS and the database server. So this setup is acceptable but Oracle depreciated to use this architecture, because it should be replaced by option 3.
MOS Note: 1945619.1
Starting with the 12.1.3 Oracle HTTP Server (OHS), the mod_plsql feature has been deprecated. OHS / mod_plsql will not be included with the 12.2 version of the database or the 12.2 Oracle HTTP Server according to Note 1576588.1 – Oracle Web Tier – Statement of Direction. This deprecation notice only affects future product direction for the Oracle HTTP Server, and the mod_plsql will continue to be supported according to the dates defined in the Fusion Middleware Lifetime Support Policy document.
For the future, Oracle recommends moving to Oracle REST Data Services (formerly known as Oracle APEX Listener) as an alternative to mod_plsql…
The last Option 3 offers, three tiers – the client, the ORDS and the database server, too. You’ve also the benefit of using REST-API for your APEX environment. I continue with option 3.
To make it more understandable, here’s a picture between all three setups:
Installation
Database
I starting with the database part and create two additional tablespaces for APEX. I created two additional tablespace. Where one tablespace “APP_FILES” will contain the apex engine and the other one will be used for APEX workspace objects like apps, tables, views and so on.
CREATE TABLESPACE APP_FILES DATAFILE '+DATA01/dbname/datafile/app_files' SIZE 800M; CREATE TABLESPACE APP_DATA DATAFILE '+DATA01/dbname/datafile/app_data' SIZE 2G;
Download last version of APEX and install it.
@apexins.sql APP_FILES APP_FILES TEMP /i/
Because we want to use REST API, execute additional script “apex_rest_config.sql” which is present at “$ORACLE_HOME/apex“. This will create additional database users and some db objects.
sqlplus <user>/<pw> @apex_rest_config.sql
Unlock and set passwords for all new apex db users:
- APEX_PUBLIC_USER
- APEX_REST_PUBLIC_USER
- APEX_LISTENER
- ORDS_PUBLIC_USER
Execute further script to set password for ADMIN user from internal workspace.
sqlplus <user>/<pw> @apxchpwd.sql
Furthermore add network ACLs for database user APEX_050000 to allow network communication. APEX_050000 is representing the apex engine.
Verfiy if installation was succesfully by quering view DBA_REGISTRY.
SELECT COMP_ID, COMP_NAME, VERSION, STATUS, SCHEMA FROM DBA_REGISTRY WHERE COMP_ID = 'APEX';
COMP_ID | COMP_NAME | VERSION | STATUS | SCHEMA |
APEX | Oracle Application Express | 5.0.3.00.03 | VALID | APEX_050000 |