First download the Oracle Apex 5.x from the Oracle.com with the following link:
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index
D:>cd softwareapex
Then start the sqlplus and give the SYS credintials to logon as following:
D:SoftwareApex>sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 27 16:36:43 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> connect SYS AS SYSDBA
Enter password:
Connected.
After connected run the following script as given in the example below:
SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/
SQL> @apex_epg_config.sql /software -- this is the folder in which you extracted the zip file.
Up-gradation is complete and now you can run the Apex 5 successfully.