Step by step Oracle Apex 20.1 / 21.1 installation on Windows and Unix/Linux systems.

 Oracle Application Express (APEX) is a low-code development platform that enables you to build scalable, secure enterprise apps, with world-class features, that can be deployed anywhere. Here are the step by step instructions to install Oracle Apex 20.1 on Windows and Unix/Linux systems. 

  • Oracle Apex Installation Requirements
  • Oracle Application Express release 20.1 requires 
  • an Oracle Database release 18c or later,
  • OS Windows 10 / Linux 

There are the steps to install Oracle Application Express release 20.1.


Step 1 Download Apex

To download Oracle Application Express release 20.1, go to following link:

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


Step 2. Unzip in desired location 

After downloading, you will get a zip file named something like - apex_20.1. Copy the file from the default download folder and paste it to the folder in which you want to install Oracle Apex 20.1, for example, I moved this file to F:\oracle\apex20, and after extracting the file, I got the "apex" directory here. Now the complete path of my Oracle Apex installation is F:\oracle\apex19\apex.


 On Unix/Linux your directory path could be like /home/oracle/apex20_1 for example.


Step 3. Open Terminal or CMD 

Open the command prompt (CMD) on Windows or Terminal on Unix/Linux and changed the directory to the F:\oracle\apex20_1 as follows:

On Windows:

cd F:\oracle\apex20_1\apex

On Unix/Linux:

cd /home/oracle/apex20_1/apex


Step 4. Connect database 

Now you need to run all the Oracle Apex 19.1 installation scripts from this (F:\oracle\apex19\apex) location. Start the SQL*PLUS with SYS user credentials to connect to the Oracle Database as shown in the following example:

[oracle@oradb apex]$ sqlplus /nolog
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Nov 21 15:28:17 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.

SQL> connect sys as sysdba
Enter password:
Connected.
SQL>


Step 5. Select PDB Database 

In Multitenant architecture, Oracle has a great option to create different databases for specific applications such as sales database, hr database. So installing apex in different PDB is good to maintain and you can install apex in different PDB databases. For that we can see what PDBs exist in the instance and need to alter session for that PDB using following commands. 

Show pdbs; 
alter session set container=pdbdev;

So now, pdbdev is selected to install Apex 20. 


Step 6. Run apex installation Script 

At first, we need to run apexins.sql passing the following four arguments in the order shown:

@apexins.sql tablespace_apex tablespace_files tablespace_temp images

For understanding:

  • tablespace_apex is the name of the tablespace for the Oracle Application Express application user.
  • tablespace_files is the name of the tablespace for the Oracle Application Express files user.
  • tablespace_temp is the name of the temporary tablespace or tablespace group.
  • images is the virtual directory for Oracle Application Express images. For installations using EPG, /i/ is the required value for the images argument. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

So now run this: 

@apexins.sql SYSAUX SYSAUX TEMP /i/

it will create many files and finally shows the message as like: 

………………...
PL/SQL procedure successfully completed.

1 row selected.
...null1.sql


Step 7. Set Admin Password 

Now run the change password script for the ADMIN user as following and the password must follow the complexity rules, for example, I provided the password as Apex#2020.

 @apxchpwd.sql


Step 8. Run Image Script 

Now run the script to copy the Oracle Apex 20.1 images to the apex/images folder. Run the script as follows:

@apex_epg_config.sql F:\oracle\apex20_1\

 

Note: As I copied the Oracle Apex zip file to the F:\oracle\apex20_1 folder, so I am specifying the same directory here for “apex_epg_config.sql” script. Do not include the apex folder in this path.


Step 9. Unlock the APEX_PUBLIC_USER  

Unlock the APEX_PUBLIC_USER account and specify the password. Don’t forget to connect to Oracle using SQL*PLUS if disconnected and make sure you are connected with PDB. 

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;

To change the password for the APEX_PUBLIC_USER account:

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Pusr#123;


Step 10. Run Configure Apex RESTful Service Script 

 @apex_rest_config.sql

This will ask you to give APEX_LISTENER and APEX_PUBLIC_USER password to set which will be used later for the ORDS setup. 


Step 11. Set the HTTP port 

 if using HTTP server, execute the following command:

EXEC DBMS_XDB.SETHTTPPORT(8181);

Now the installation of Oracle Apex 20.1 has been completed, and you test the installation by entering the following URL in the browser: http://localhost:8181/apex/apex_admin


Your playground is ready. 


Play and Enjoy. 

………………………………………………………….


*** Optional: If face problem in first login: 

Sometime, after installing Apex, when we try to login in this http://localhost:8181/apex/apex_admin, it shows a popup login and could not login this. 

Mostly this occurs because the ANONYMOUS account is locked and/or expired.


In this situation, Log in to main container database (not PDB) and run the following query to determine status:

select account_status from dba_users where username = 'ANONYMOUS';

If account_status is expired and locked, run the following:

alter user ANONYMOUS identified by anonymous;
alter user ANONYMOUS account unlock;

 And try again to login. 

……………………………….

Comments

Popular posts from this blog

ORA-01172: recovery of thread 1 stuck at block 3024 of file 19