This article presents how to install and configure Apex for version 5.0.X for Oracle 11G
Prepare software to installation
Download installation package from Oracle site and unzip.
apex_5.0.X.zipto directory /tmp and unzip it from http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html cd /tmp unzip <downloaded software>
After unzip is completed a new directory will be created /tmp/apex so go to this directory and log into database as SYSDBA. Always use SYSDBA account for running all scripts.
cd /tmp/apex sqlplus / as sysdba
It’s recommended to do backup of the database and disable the Oracle XMLDB HTTP server by setting the HTTP port to 0.
Install full development option
@apexins tablespace_apex tablespace_files tablespace_temp images tablespace_apex - name of the tablespace for APEX user. tablespace_files - name of the tablespace for APEX files user. tablespace_temp - name of the temporary tablespace. images - virtual directory for APEX images. Define the virtual image directory as /i/ for future updates. @apexins SYSAUX SYSAUX TEMP /i/When Oracle Application Express installs, it creates three new database accounts:
APEX_050000– The account that owns the Oracle Application Express schema and metadata.
FLOWS_FILES– The account that owns the Oracle Application Express uploaded files.
APEX_PUBLIC_USER– The minimally privileged account is used for Oracle Application Express configuration with Oracle Application Express Listener or Oracle HTTP Server and
Change password for ADMIN account. When prompted enter a password for the
Configure embedded PL/SQL Gateway and unlock ANONYMOUS account. One important note – you are calling script from directory /tmp/apex but you need to specify /tmp. It can seem a little bit weird.
ALTER USER ANONYMOUS ACCOUNT UNLOCK;
Verifying Oracle XML DB HTTP Server Port and set it to 8080
SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
EXEC DBMS_XDB.SETHTTPPORT(port); EXEC DBMS_XDB.SETHTTPPORT(8080);
Enable Network Services in 11g
By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 or 2. Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 or 2, you must use the new
DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the
APEX_050100 database user. User name can change with next releases to APEX_050200, APEX_050XXXX so keep it in mind.
DECLARE ACL_PATH VARCHAR2(4000); BEGIN -- Look for the ACL currently assigned to '*' and give APEX_050100 -- the "connect" privilege if APEX_050100 --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_050100', 'connect') IS NULL THEN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 'APEX_050100', 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_050100', TRUE, 'connect'); DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*'); END; / COMMIT;
Configure database parameters for APEX
JOB_QUEUE_PROCESSES must be set to at least 20
ALTER SYSTEM SET JOB_QUEUE_PROCESSES = <number>
ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 SCOPE = BOTH;
The embedded PL/SQL gateway uses the shared server architecture of the Oracle database. For a small group of concurrent users, Oracle recommends a value of
ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;
Verify APEX is working
Have a fun 🙂