Install Oracle Apex 19.1 in Eleven Easy Steps

Oracle Apex 19.1

Here are the step by step instructions to install Oracle Apex 19.1 on Windows and Unix/Linux systems. You need to perform eleven easy steps to install it. The following are the version details of OS, Oracle Database and Oracle Application Express used in this demonstration:

  • OS Windows 10
  • Oracle Database 11g
  • Oracle Apex 19.1.0.00.15

Installing Oracle Apex 19.1

1. Download Oracle Apex from the following link:

Download Oracle Apex 19.1

2. After downloading, you will get a zip file named something like "apex_19.1_en.zip". Copy the file from the default download folder and paste it to the folder in which you want to install Oracle Apex 19.1, for example, I moved this file to F:\software\apex19, and after extracting the file, I got the "apex" directory here. Now the complete path of my Oracle Apex installation is F:\software\apex19\apex. On Unix/Linux your directory path could be like /home/usr1/apex19/apex for example.

3. Open the command prompt (CMD) on Windows or Terminal on Unix/Linux and changed the directory to the F:\software\apex19\apex as follows:

On Windows:

cd F:\software\apex19\apex

On Unix/Linux:

cd /home/usr1/apex19/apex

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

sqlplus sys/syspsw@orcl as sysdba

Now run the first script as following, note you can change the tablespace names according to your database.

@apexins.sql SYSAUX SYSAUX TEMP /i/

5. After completing the above script, run the following script for the Oracle Apex run time environment settings. But first, you need to connect to Oracle Database again because after running the above script it will disconnect you from Oracle database.

sqlplus sys/syspsw@orcl as sysdba
@apxrtins.sql SYSAUX SYSAUX TEMP /i/

6. 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#2019.

sqlplus sys/syspsw@orcl as sysdba
@apxchpwd.sql

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

sqlplus sys/syspsw@orcl as sysdba
@apex_epg_config.sql F:\software\apex19\

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

8. Unlock the APEX_PUBLIC_USER account and specify the password. Don't forget to connect to Oracle using SQL*PLUS if disconnected.

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY vinish;

9. Configure Apex RESTful Services as follows:

Connect to Oracle using SQL*PLUS if disconnected.

sqlplus sys/syspsw@orcl as sysdba
@apex_rest_config.sql

10. Set the HTTP port if using HTTP server as follows:

Connect to Oracle using SQL*PLUS if disconnected.

sqlplus sys/syspsw@orcl as sysdba
EXEC DBMS_XDB.SETHTTPPORT(8181);

11. Configure the network ACL for Oracle Apex 19.1 as follows:

For Oracle Database versions 10g/11g, run the below script:

DECLARE
  ACL_PATH  VARCHAR2(4000);
BEGIN
  -- Look for the ACL currently assigned to '*' and give APEX_190100
  -- the "connect" privilege if APEX_190100 does not have the privilege yet.
 
  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
 
  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_190100',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_190100', TRUE, 'connect');
  END IF;
 
EXCEPTION
  -- When no ACL has been assigned to '*'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_190100', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
DECLARE
  ACL_PATH  VARCHAR2(4000);
BEGIN
  -- Look for the ACL currently assigned to 'localhost' and give APEX_190100
  -- the "connect" privilege if APEX_190100 does not have the privilege yet.
  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
   
  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_190100',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_190100', TRUE, 'connect');
  END IF;
  
EXCEPTION
  -- When no ACL has been assigned to 'localhost'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
    'ACL that lets users to connect to localhost',
    'APEX_190100', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;

For Oracle Database version 12c, run the below script:

BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '*',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_190100',
principal_type => xs_acl.ptype_db));
END;
/

BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => 'localhost',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_190100',
principal_type => xs_acl.ptype_db));
END;
/

Now the installation of Oracle Apex 19.1 has been completed, and you test the installation by entering the following URL in the browser:

http://localhost:8181/apex/apex_admin

See also:

Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of foxinfotech.in and orclqa.com a question and answer forum for developers.

This Post Has 26 Comments

  1. Slavko
    @apxrtins.sql SYSAUX SYSAUX TEMP /i/
    Why above command Generates Error  (apex_20.1_en.zip, Win 10 64 bit) :
    FAIL - Precondition for Phase 1 failed: APEX_200100 already exists
                    . 2 errors occurred
                    declare
                    *
                    ERROR at line 1:
                    ORA-20001: Prerequisite checks failed; unable to proceed with APEX installation
                    ORA-06512: at line 288
                    Disconnected from Oracle Database 11g XE Release 11.2.0.2.0 - 64bit Production
    
    
    1. Vinish Kapoor

      It means you have already installed Apex 20.1.

      You need to remove it prior to new install using the following script:

      @apxremov.sql 
      
    2. Deepankar

      Hi Vinish, Getting following error on step no 9
      'Enter: GetConsoleMode failed, LastError=|6| at C:/Oracle12c/product/12.1.0/dbhome_1/perl/site/lib/Term/ReadKey.pm line 277.
      Please suggest

    3. Vinish Kapoor

      In Oracle database 12c, you have run the following command to set the current PDB before running any script:

      alter session set container = yourPDBname;
      

      You can check the full tutorial here: Installing Oracle Apex on PDB

    4. Deepankar

      Thank you for replying. I am not using normal grid DB not as PDB. Kindly suggest

    5. Deepankar

      Thank you for replying. I am using normal grid DB not as PDB. Kindly suggest

    6. Vinish Kapoor

      It is better to install Oracle Apex on PDB, not on CDB. You can create a PDB with a few commands as below:

      CREATE PLUGGABLE DATABASE pdbapx ADMIN USER pdb_admin IDENTIFIED BY yourpsw;

      ALTER PLUGGABLE DATABASE pdbapx OPEN;
      ALTER PLUGGABLE DATABASE pdbapx SAVE STATE;

      ALTER SESSION SET CONTAINER=pdbapx;

      Now first run the apexremov.sql to remove the existing installation on CDB, then start running all the scripts and don't forgot to set container database for the session.

      Please follow the steps from the link I shared.

    7. Deepankar

      This solved my problem Vinish. Thanks a ton!

    8. Deepankar

      Hello Vinish,
      Could you please guide, why ACL configuration is required

    9. Vinish Kapoor

      ACL configuration is required, so that the user can connect to Oracle database using the localhost or any other network location and can use the Oracle network services. And in Oracle Apex we connect to Oracle DB via the browser.

      Also, required to send emails.

  2. Nitin

    I have installed Apex 19.1 on Oracle 12.0.2.0. I have followed all the steps given in this article but I could not login. It just flash Login Page. What could be the reason.

  3. Nitin

    Through which User id we can login into Apex Web Browser, I tried Apex User and Admin also but it just dont allowed me to login in.

    1. Vinish Kapoor

      Perhaps you didn't unlocked the ADMIN account. Run the following script again:

      sqlplus sys/syspsw@orcl as sysdba
      @apxchpwd.sql
      

      It will ask you to change the password for the admin user. Specify the password and then use the ADMIN user with the password you specified to login.

      Also make sure that you have unlocked the Apex public user mentioned in the 8th step.

    2. Nitin

      I did every steps as you mentioned. But still i am stuck as Login page only. What could be the reason. I created APEX_LISTENER,Unlock APEX public user etc. but no success.

    3. Vinish Kapoor

      What exactly error are you getting? Can you share the screenshot.

      Also check, if you have successfully executed the script for 7th step. Because if the images were not loaded correctly, then this kind of issue happens.

      You can also share your issue in more detail on our q&a forum orclqa.com. Maybe you can get the help from other users as well.

  4. Subrat Dey
    http://localhost:8181/apex/apex_admin
    

    I am unable to login using the username password I passed @apxchpwd.sql, how would I login

    1. Vinish Kapoor

      What error are you getting?

    2. Subrat Dey

      It just pops up a login window and it just ask for username and password, I dont know what values to be passed, I tried all the possible uname and password. but it should have a proper apex login screen with workspace thats doesnt appear.

    3. Vinish Kapoor

      Repeat the 7th step and make sure you do not get any errors. Most users make a mistake in this step.

      For example, you extracted the apex zip installation file at D:\apex19. Then pass this directory name with the script as follows:

      sqlplus sys/syspsw@orcl as sysdba
      @apex_epg_config.sql D:\apex19
      
  5. Kinjan Bhavsar

    Hi Vinish,

    I am getting the following error when I try to install APEX 20.2 on Oracle 19c. SQLPLUS is working fine but not sure why it keeps on giving me ORACLE_HOME path error?

    Use of uninitialized value $ENV{"ORACLE_HOME"} in concatenation (.) or string at C:\Oracle\db_home/rdbms/admin/catcon.pm line 13835.

    Even I tried to remove already installed APEX version using @apexremove.sql but still I get same error in that and also other error

    ...set_appun.sql
    ERROR:
    ORA-01435: user does not exist
    
    
    
    
        wwv_flow_upgrade.drop_public_synonyms(p_drop_all => TRUE);
        *
    ERROR at line 2:
    ORA-06550: line 2, column 5:
    PLS-00201: identifier 'WWV_FLOW_UPGRADE.DROP_PUBLIC_SYNONYMS' must be declared
    ORA-06550: line 2, column 5:
    PL/SQL: Statement ignored
    
    
    
    
    ...set_ufrom_and_upgrade.sql
            wwv_flow_upgrade.flows_files_objects_remove('APEX_200200');
            *
    ERROR at line 3:
    ORA-06550: line 3, column 9:
    PLS-00201: identifier 'WWV_FLOW_UPGRADE.FLOWS_FILES_OBJECTS_REMOVE' must be
    declared
    ORA-06550: line 3, column 9:
    PL/SQL: Statement ignored
    

    Can you please help me to install APEX 20.2 to use it as localhost? I have successfully installed Oracle database 19c and its working in SQLPLUS and SQLDeveloper.

    Thanks

  6. Kinjan Bhavsar

    HI Vinish,

    Ignore my last comment

    After using alter session set container = yourpdbname; I have able to install APEX successfully but I get error when I try to run the file @apex_rest_config.sql. The error is as follows

    Can you please suggest what steps should I follow to fix this issue?

    Use of uninitialized value $ENV{"ORACLE_HOME"} in concatenation (.) or string at C:\Oracle\db_home/rdbms/admin/catcon.pm line 13835.
    catcon::catconExec_int: 'Enter:
    
    GetConsoleMode failed, LastError=|6| at C:/Oracle/db_home/perl/site/lib/Term/ReadKey.pm line 346.
    
    
    1. Vinish Kapoor

      I think you need to set the ORACLE_HOME system variable.

  7. irfan
    when i want to http://localhost:8181/apex/apex_admin
    

    then browser ask for use name and password .

    which username and password need to give

    1. Shafiullah Ahmadzai

      HI Vinish,

      I have installed Apex Successfully, i try to login but it is not getting login. I also successully cchanged using  @apxchpwd.sql .. But still am not getting login below url
      
      
      http://localhost:8181/apex/apex_admin
      
  8. ZAKRIA

    Hi Vinish
    can we have a blog about new version 20.2 installation please.

  9. shahid

    Hi, when i try to run apex_admin from browser it is asking userid/password by browser!!
    I tried apex admin id/password it does not work. which id/password i should provide here. on internet i checked they are saying its clash of port by oracle database and apex (most probably the server). i tried to install apex with different ports as well e.g. 8181, 8191 but still same issue. please let me know

Comments are closed.