Monday, 22 March 2021

Configure APEX20.2 on 12c/19c Pluggable Database – using ORDS, deployed on Apache Tomcat - LINUX

 



Configure APEX20.2 on 12c/19c Pluggable Database – using ORDS, deployed on Apache Tomcat on LINUX Environment

 Linux Environment

 1.    Create a pluggable database.


Database version

12.2

Container db

Apxcdb

Pluggable db

apxpdb

 

 2.    Install & Configure Apex 20.2 inside Pluggable Database

 

è Download the latest version of Apex20.2 media

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


è Download latest version of Java

https://www.java.com/en/download/


è Download latest version of ORDS

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


è Download latest version of Apache Tomcat < for windows download the windows service installer media for Tomcat >

  Ø  Copy the apex media to an alternate location & unzip the media

We will unzip the apex_20.2.zip downloaded media to location /home/oracle/soft/apex20

<< apex_epg_config.sql, is no longer part of Apex20 media, it is used for embedded plsql >>

 Ø  Connect to Pluggable Database and install Apex20

Navigate to the /home/oracle/soft/apex20 folder where you have unzipped the Apex media.

Cd /home/oracle/soft/apex20

o   First we need to connect to container db

export ORACLE_SID=Apxcdb

sqlplus / as sysdba

o   Now connect to pluggable db

Alter session set container=apxpdb;

            


 We will execute the below scripts in the sequence mentioned


 You can create a separate tablespace for Apex schema or you can put it under SYSAUX schema.

    Create tablespace apex_tbs datafile ‘/home/oracle/db/oradata/apxdb01.dbf’      Size 500m autoextend on next 500m maxsize 5g;

 


Change  the password


 Run the third script




ALTER SESSION SET CONTAINER = apxpdb;
ALTER USER APEX_LISTENER IDENTIFIED BY Oracle#123 ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Oracle#123 ACCOUNT UNLOCK;
ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY Oracle#123 ACCOUNT UNLOCK;
ALTER USER APEX_instance_admin_USER IDENTIFIED BY Oracle#123 ACCOUNT UNLOCK;
 
-- The next one will fail if you've never installed ORDS before. Ignore errors.
ALTER USER ORDS_PUBLIC_USER IDENTIFIED BY Oracle#123 ACCOUNT UNLOCK;
 
ALTER PROFILE default   LIMIT PASSWORD_REUSE_TIME UNLIMITED    PASSWORD_REUSE_MAX UNLIMITED;
ALTER PROFILE default LIMIT   FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LOCK_TIME 1000;

 

 3.    Install JAVA

Download the latest version of java and copy it to /home/oracle/java folder and unzip


Update bash_profile to set JAVA_HOME

export JAVA_HOME=/home/oracle/java/jre1.8.0_271

 

4.    Configure ORDS < Oracle REST data services >

 

·         Copy the downloaded ORDS folder to location /home/oracle/soft/ords & unzip it here.

·         Copy the images folder from APEX directory to ords folder

Cp –R /home/oracle/soft/apex/images /home/oracle/soft/ords


  

·         Create a folder named config under /home/oracle/soft/ords

Cd /home/oracle/soft/ords

mkdir config

this directory to store ords configuration details


·         Execute the ords.war file using java



 

Once this setup completes – you can access the apex application through ORDS standalone service


    http://apex20.scroll.com:8080/ords/apex_admin

                                default port for ords is 8080

                                 Stop the standalone service, we will deploy the ORDS service on TOMCAT.

 

5.    Configure Apache TOMCAT and deploy ORDS on top of it.

Downlod the Apache tomcat server media and copy to /home/oracle/soft/apache

In case of windows download the windows service installer media.

 

è Stop the ORDS standalone service running in previous step.

 

Download Tomcat media and unzip to a folder < eg. Apache >, change the ownership to oracle user.

Chown –R oracle:dba apache-tomcat-9.0.41

 


 

·      Copy the images folder from the APEX folder to webapps folder here and rename it to i

cp –R /home/oracle/soft/apex/images /home/oracle/soft/apache/apache-tomcat-9.0.41/webapps

mv /home/oracle/soft/apache/apache-tomcat-9.0.41/webapps /home/oracle/soft/apache/apache-tomcat-9.0.41/i

·      Copy the ords.war file from ords home to apache folder

cp –R /home/oracle/soft/ords/ords.war /home/oracle/soft/apache/apache-tomcat-9.0.41/webapps



 Set CATALINA_HOME in bash_profile to set Apache tomcat environment

export CATALINA_HOME=/home/oracle/soft/apache/apache-tomcat-9.0.41

 

cd $CATALINA_HOMe/bin


Use startup.sh and shutdown.sh scripts to start and stop Tomcat services. TOMCAT runs on default port 8080, we can change it if we wish too.

 




 

Login with admin user created in earlier step to login and create your workspace.

http://apex20.scroll.com:8080/ords

   

Thank you J

No comments:

Post a Comment