This article presents how to install and configure Apex for version 4.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5
Prepare software to installation
Download installation package from Oracle site and unzip.
Download apex_4.2.X.zip
to 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
Pre-installation steps
It’s recommended to do backup of the database and disable the Oracle XMLDB HTTP server by setting the HTTP port to 0.
EXEC DBMS_XDB.SETHTTPPORT(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_040200
– 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 andmod_plsql
.
Change password for ADMIN account. When prompted enter a password for the ADMIN
account.
@apxchpwd
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.
@apex_epg_config /tmp
ALTER USER ANONYMOUS ACCOUNT UNLOCK;
Update images from previous releases
@apxldimg.sql /tmp
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_040200
database user.
DECLARE ACL_PATH VARCHAR2(4000); BEGIN -- Look for the ACL currently assigned to '*' and give APEX_040200 -- the "connect" privilege if APEX_040200 -- 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_040200', 'connect') IS NULL THEN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 'APEX_040200', 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_040200', 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 5
for SHARED_SERVERS
.
ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE=BOTH;
Verify APEX is working
Administration page
http://hostname:port/apex/apex_admin
Development page
http://hostname:port/apex
Have a fun 🙂
Tomasz
Really helpful, flawless install
Thanks great job
Excellent post! Once I figured out that the argument to @apex_epg_config is the directory path one level above the extract path, I was up and running in no time.
Thanks a lot for this posting.
I’ve been wasting about 2 days trying to fix my APEX installation after migration.
You saved my weekend !
Great 🙂
Åšwietny poradnik Tomasz!
True. It’s quite popular topic 🙂
very helpful.
Very helpful , thank you.
Excellent work – really helpful and well presented
Thanks a lot! It was very helpful! 🙂
Hi,
After the successful installation I am not able to connect to the URL:
It says “Unable to Connect”…..Can you please help me?
Kadhir.
Please be sure listener is up and you see apex is registered there.
Regards
tomasz
Thanks man.
It Worked!!
Cheers
Mine is tellling me that Admin “The account is locked” after my installation was successful.
Please help me I am using apex4.2.6 on Oracle 12C version 12.1.0.2
You can change password for admin user using apex scripts @apxchpwd. It’s described in the article.
Regards
Tomasz