Installation and Configuration of Oracle Application Express with Oracle REST Data Services and Apache Tomcat
Installed Softwares (requirement may vary)
- Oracle Application Express 5.1.4
- Apache Tomcat 7.0.96
- Oracle Rest Data Service ORDS 18.1.1
Installation Steps
PART 1: Installing Oracle APEX
PART 2: Installing APACHE TOMCAT
PART 3: Installing ORDS
Download Oracle APEX
You can download Oracle APEX at:
https://www.oracle.com/tools/downloads/apex-v51-downloads.html
The download software is located on my local machine
Click on next
Click on finish
Go to the software location:
PART 1: Installing Oracle APEX
- unzip apex_5.1.4\ \(1\).zipunder /home/oracle location
- Login into the database as SYSDBA
Create Tablespace in database for storing Apex data
CREATETABLESPACE APEX DATAFILE ‘/u01/app/oracle/oradata/testdb/apex01.dbf’ SIZE 1G AUTOEXTEND ON NEXT 10M;
3. Execute the installation script
SQL> @apexins apex apex temp /i/
- Set password for ADMIN user
SQL> @apxchpwd.sql
- Configure database RESTful services – the passwords for the new created users APEX_LISTENER and APEX_REST_PUBLIC_USER will be used later for the ORDS setup
SQL> @apex_rest_config.sql
- APEX_LISTENER– The account used to query RESTful Services definitions stored in Oracle Application Express.
- APEX_REST_PUBLIC_USER– The account used when calling RESTful Services definitions stored in Oracle Application Express.
- Set password for the APEX_PUBLIC_USER and unlock the account:
ALTER USER apex_public_user IDENTIFIED BY oracle ACCOUNT UNLOCK;
7. Enable Network Services
To Allow other hosts than the localhost to use the Oracle Application Express installation
By default, Network Services are disable in Oracle 11g or the newer version. Therefore, you must use the package of DBMS_NETWORK_ACL_ADMIN in order to to grant connect privileges to any host for the APEX_050100 database user
Run the below command to grant connect privileges to any host for the APEX_050100 database user.
Note:
Grant connect for APEX_050100 user (If database is Oracle 12c):
Procedures CREATE_ACL, ASSIGN_ACL, ADD_PRIVILEGE and CHECK_PRIVILEGE in DBMS_NETWORK_ACL_ADMIN are deprecated in Oracle Database 12c. Oracle recommends using APPEND_HOST_ACE instead.
Download APACHE TOMCAT
You can download APACHE TOMCAT at:
https://tomcat.apache.org/download-70.cgi
Under Quick Navigation click on 7.0.96
Under Core: click on tar.gz extension to download the file.
PART 2: Installing APACHE TOMCAT
- Create directory
2. Go to directory and extract software from/home/oracle location
tar -xvf jdk-13.0.1_linux-x64_bin.tar.gz
tar -xvf apache-tomcat-7.0.96.tar.gz
Two new directories for Apache Tomcat and JDK are created:
3. Create an environment file tosimplify the management with the Apache Tomcat application server,
[oracle@emtest~]$ vi tomtest.env4. Startup Tomcat
You can now access the console of tomcat using http://192.168.1.67:8080
5. Shutdown Tomcat
6. To enable access to manager app and manager app gui. Add below to lines to file tomcat-users.xml
Oracle REST Data Services
Oracle REST Data Services (ORDS) is a data service which is used to replace Oracle HTTP server and mod_plsql. It bases on Java EE that provides RESTful service and increases security capability. it can deploy on WebLogic, Tomcat, Glassfish or independently.
Interaction between Oracle and Oracle APEX ORDS
You can Install Oracle APEX on a specific web server such as WebLogic, Tomcat or Glassfish, …
To use RESTful services, you need to install Oracle ORDS which can deploy on WebLogic Server, Tomcat, Glassfish,.. or independently. Oracle ORDS can read directly to Oracle APEX and replace completely Oracle HTTP Server, therefore you can use RESTful on APEX and new URL to work with Oracle APEX.
Download Oracle ORDS
You can download Oracle ORDS at:
PART 3: Installing ORDS
- Create ORDS installation directory
2. Extract The ords software under /home/oracle/ordslocation
To check the extracted directories and files
3. mkdir /home/oracle/ords/conf
4. Edit the database configuration template to set hostname and database service name
5. Set Oracle REST Database Service ORDS configuration directory
You will be asked for a new password for the database user ORDS_PUBLIC_USER (user will be created by this script)
The values for database server, hostname and the service name are taken from the configuration file ords_params.properties.
You can see the encrypted passwords and the selected tablespaces in the configuration file ords_params.properties:
6. Optimize the database connection settings – add these lines to the apex.xml configuration file
7. Prepare the application server directory for the Oracle Application Express images
8. Copy the ORDS application ords.war to the Apache Tomcat:
9. Startup the application server
10. Login into Oracle Application Express – add /ords at the end of the application server URLhttp://168.1.67:8080/ords