Oracle APEX Installation With ORDS & TOMCAT

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

amakahhal@optimizasolutions.

com
R&D TEAM - OPTIMIZA

ORACLE APEX 21.2,


ORDS 21.4 and TOMCAT
9.0 Installation on
ORACLE 19C database
Introduction: Pre-requests:
- Oracle 19c Database installed in your PC with at
We will make a step-by-step installation process for least one pluggable database so we will install APEX
ORACLE APEX 21.2 with ORDS 21.4 and deploy it on TOMCAT on it
9.0.
- Make sure java JDK-17 is installed already and java
-version command output is working, if NOT
First and before we start, please take a look for the download and install JDK
requirements section.
- Set the JAVA_HOME value to C:\Program
Files\Java\jdk-17.0.2 on system Environment
Variables
- Set CLASSPATH value to C:\Program
Files\Java\jdk-17.0.2\bin on system Environment
Variables
- Set ORACLE_HOME value to
D:\app\Oracle\product\19.3.0
Setup: - Add %JAVA_HOME%\bin and
- Download APEX 21.2 .zip file from %ORACLE_HOME%\bin to the User variables PATH

here
- Download ORDS 21.4.2 .zip file from
here
- Download TOMCAT 32-bit/64-bit
windows Service Installer from here
APEX INSTALLATION
First create a new folder d:\oracle\ then unzip the apex binary zipfile so now you have d:\oracle\apex dir

Open command prompt, point to directory d:\oracle\apex and login to Oracle pluggable database
using sqlplus Login with SYS user using this commands:
set ORACLE_SID=oppdb
sqlplus sys/sys@oppdb as sysdba
where the oppdb is the name of the pluggable database in my case

Now we will create our tablespace by run this command:


Create Tablespace apex
logging
datafile 'D:\app\Oracle\product\oradata\ORCL\oppdb\APEX.DBF' size 500m
autoextend on
next 64m maxsize 5G
extent management local;

Tablespace created.
APEX INSTALLATION

Execute the “apexins.sql” script, specifying the tablespace names and image URL.
SQL> @apexins.sql APEX APEX TEMP /i/

this takes some time, wait for the installation to get complete

Now change the admin password by running the “apxchpwd.sql” scripts as the SYS user by run this command:
SQL> @apxchpwd.sql

Now create APEX_LISTENER and APEX_REST_PUBLIC_USER users by running the apex_rest_config.sql on same prompt
logged in as SYS user
NOTE: ENTER ONE EMAIL FOR ALL STEPS WE WILL MAKE
SQL> @apex_rest_config.sql

Check the status of users created on database, you can notice that the account is locked for these. Execute below
command one by one with the same password to unlock the users.

ALTER USER APEX_LISTENER ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;


ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;
ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;
ALTER USER APEX_INSTANCE_ADMIN_USER ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;
ALTER USER APEX_210200 ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;
ALTER USER ORDSYS ACCOUNT UNLOCK IDENTIFIED BY P#ssw0rd2021;
ALTER USER ANONYMOUS ACCOUNT UNLOCK;
Alter user APEX_INSTANCE_ADMIN_USER identified by CCCccc##123 account unlock;

Check the port setting for XML DB Protocol Server. Default it will be ‘0’ for 21.2 the value has to be ‘0’
SQL> select dbms_XDB.gethttpport from dual;
If the value is not zero execute the command to make it 0
SQL> EXEC DBMS_XDB.sethttpport(0);

Oracle REST Data Services Installation (ORDS)

Create a new folder inside D:\oracle and name it ords so you now have D:\oracle\ords dir
Now unzip ords zipfile inside this folder

Create a directory config under ords

From the APEX folder copy the image folder to ords folder

Open command prompt, point to directory d:\oracle\ords and execute below command to start with ORDS installation
java -jar ords.war
Choose location for Store Configuration data-> D:\oracle\ords\config

Now complete :

Enter number for... [1]: Hit "Enter" button.

Database server is [localhost]: Hit "Enter" button

Enter listen port [1521]: Hit "Enter" button, my port is 1521 your port may be different.

Specify Database SID [1]: provide option "1" & hit "Enter" button, the database service name is the pluggable database
make sure for that, my pluggable db here is ‘oppdb’

Enter 1 if you want to verify... [1]: Hit "Enter" button.

Enter password & Confirm password for ORDS_PUBLIC_USER


The same one you entered

Enter administrator username (sys), password, & Confirm password.


The same one you entered

If using Oracle Application Express or migrating from... [1]: Hit "Enter" button

Enter the PL/SQL Gateway... [APEX_PUBLIC_USER]: Hit "Enter" button.


The same one you entered

Specify password, & Confirm password for APEX_PUBLIC_USER from your choice.
The same one you entered

Enter a number to select a feature to enable…[1]: Hit "Enter" button.

Now the ORDS start installing on your pc


After complete he will ask you if you want to run the ORDS in standalone mode, in our case we want to deploy the ords
on TOMCAT so enter number 2 and hit enter button

Enter 1 if you wish to start in standalone mode... enter 2 Hit "Enter" button.

CONGRAAAAAATS

Now start installation process for TOMCAT from exe file we downloaded
After installation process got to the tomcat file you created

Open the webapp folder and make a new folder and call it (i)

Go to APEX folder and open images folder and copy all its content D:\oracle\apex\images
Then go back to (i) folder you created and past all images inside it.
Now we want to deploy ORDS on tomcat, so go to D:\oracle\ords file and copy ords.war file
Then go to tomcat webapps file and past it here

Now visit the URL:


http://localhost:8080/ords/

CONGRATS MAN!!

Now scroll down and click on administration link to create a new workspace to signin

Ahmad Mukahal, R&D TEAM – OPTIMIZA


Thanks.

You might also like