Installing Apex5Before installing apex 5 you should determine which Web listener you would like to use. Available options include the followings -
- Oracle REST Data Services
- Embedded PL/SQL Gateway
- Oracle HTTP Server and mod_plsql
- Oracle Database 11gR2 (11.2.0) 64-bit
- Oracle apex 5.0
- Toad 12.8 64-bit
- Windows 7 64-bit
Remember I’ll not discus about installing database. I assume that you have a database already installed and you have the administrative privileges on the database. Also assume that you have downloaded apex. If not so, you may get a copy of Oracle Apex 5.0 on OTN
Steps to install Oracle Apex 5Step 1: Login to database and create a table space (e.g.TS_APEX). Table space creating command is as below
CREATE TABLESPACE ts_apex DATAFILE 'C:\APP\ADMINISTRATOR\ORADATA\CANOPAS\TS_APEX01.DBF' SIZE 2048M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K FLASHBACK ON;
Step 2: Unzip the apex folder. (Right click on apex_5.0.zip folder then choose extract here) you will find a folder named apex. Copy this folder anywhere on your hard drive you wish. In my case I’ve put it in H:\SoftWare\Apex\apex.
Step 3: Open Command Prompt (cmd). Change your working directory to apex where you put the unzipped apex folder (in my case it is H:\SoftWare\Apex\apex). Below images showing the command
Step 4: Now open SQL*Plus with nolog option by executing the command H:\SoftWare\Apex\apex> sqlplus /nolog Then SQL> conn sys as sysdba (To connect to database with sysdba privileges) When password require enter sys user’s password.
Step 5: Now you need to run apex installation file named apexins.sql. in command prompt enter the command like below SQL> @apexins.sql ts_apex ts_apex temp /i/ [Here APEXINS.SQL is the apex main installation file. TS_APEX is the table space name which we creates at first step for apex user,temp is also a table space for apex temporary file. /i/ is a virtual drive for images. ] It may take 20/30 minutes and may be disconnect from database. Remember whenever you disconnect from database every time you must follow the step (3, 4) to connect again. When Oracle Application Express installed, it creates three new database accounts:
- APEX_05000 - 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 used for Oracle
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password;
Configuring Restful ServicesTo configure oracle restful service connect to the database as sysdba and enter the following command SQL> @apex_rest_config.sql
Enter a password for the APEX_LISTENER user  Enter a password for the APEX_REST_PUBLIC_USER user 
Installing and Configuring Oracle Rest Data Servicesa. Download the file ” ords.version.number.zip” from the Oracle REST Data Services download page
b. Unzip the downloaded zip file into a directory (folder) of your choice. I put it in E:\ords.220.127.116.111.13.24. Actually there is nothing to install, that means your installation is done. Now you need to configure the Rest Data Service.
I. By default, the context roots for accessing Oracle Application Express through Oracle REST Data Services is …/ords. If you wish to have a context root of … /apex for accessing Oracle Application Express, rename the file ords.war (E:\ords.18.104.22.1681.13.24\ords.war) to apex.war before installing Oracle Rest Data Service. If you change the ords.war to apex.war then change the file ords_params.properties. Open the ords_params.properties file (location E:\ords.22.214.171.1241.13.24\params) enter the line as it is here: rest.services.apex.add=true
II. Create a folder named config in the rest data service folder (E:\ords.126.96.36.1991.13.24\config) to store rest data service configuration data. Later this location will be needed during configuration. Remember you can provide any location in your hard drive. To keep it in one place I've create this folder in ords.188.8.131.521.13.24 folder
c. following are the Installation/configuration options-
- Simple Installation/configuration Using a Parameter File
- Advanced Installation/configuration Using Command-Line Prompts
- Manual Installation/configuration (If You Do Not Have SYSDBA Privileges)
Now open cmd and change your working directory to the directory or folder containing the ords.war file (in my case it is E:\ords.184.108.40.2061.13.24).If you don't have rename ords.war to apex.war then enter the following command E:\ords.220.127.116.111.13.24> java -jar ords.war install advanced
if you have rename ords.war to apex.war then enter the following command E:\ords.18.104.22.1681.13.24> java -jar apex.war install advanced It will prompt you for some configuration information. Here I’ve showed the full prompt and what I selected.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Windows\system32>cd E:\ords.22.214.171.1241.13.24 C:\Windows\system32>e: E:\ords.126.96.36.1991.13.24>java -jar apex.war install advanced Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. All rights reserved. C:\Users\azad>cd D:\Oracle\RestDataService\ords.188.8.131.521.13.24 C:\Users\azad>d: D:\Oracle\RestDataService\ords.184.108.40.2061.13.24>java -jar apex.war install advanced This Oracle REST Data Services instance has not yet been configured. Please complete the following prompts Enter the location to store configuration data:D:\Oracle\RestDataService\ords.220.127.116.111.13.24\config Enter the name of the database server [localhost]:bh Enter the database listen port : Enter 1 to specify the database service name, or 2 to specify the database SID :2 Enter the database SID [xe]:erp Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step : Enter the database password for ORDS_PUBLIC_USER: Confirm password: Please login with SYSDBA privileges to verify Oracle REST Data Services schema. Installation may be required. Enter the username with SYSDBA privileges to verify the installation [SYS]: Enter the database password for SYS: Confirm password: Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step. If using Oracle Application Express or migrating from mod_plsql then you must enter 1 : Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]: Enter the database password for APEX_PUBLIC_USER: Confirm password: Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step : Enter the database password for APEX_LISTENER: Confirm password: Enter the database password for APEX_REST_PUBLIC_USER: Confirm password: Feb 07, 2016 5:48:05 PM oracle.dbtools.common.config.file.ConfigurationFilesBase update INFO: Updated configurations: defaults, apex, apex_pu, apex_al, apex_rt ... Log file written to D:\Oracle\RestDataService\ords.18.104.22.1681.13.24\logs\ordsupgrade_2016-02-07_174805_00931.log Feb 07, 2016 5:48:06 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Upgrading Oracle REST Data Services schema to version 22.214.171.124 ... Log file written to D:\Oracle\RestDataService\ords.126.96.36.1991.13.24\logs\ordsupgrade_2016-02-07_174806_00217.log Feb 07, 2016 5:48:07 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Upgrading Oracle REST Data Services schema to version 188.8.131.52 ... Log file written to D:\Oracle\RestDataService\ords.184.108.40.2061.13.24\logs\ordsupgrade_2016-02-07_174807_00957.log Feb 07, 2016 5:48:11 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Upgrading Oracle REST Data Services schema to version 220.127.116.119 ... Log file written to D:\Oracle\RestDataService\ords.18.104.22.1681.13.24\logs\ordsupgrade_2016-02-07_174811_00679.log Feb 07, 2016 5:48:12 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Upgrading Oracle REST Data Services schema to version 22.214.171.1244 ... Log file written to D:\Oracle\RestDataService\ords.126.96.36.1991.13.24\logs\ordsupgrade_2016-02-07_174812_00284.log Feb 07, 2016 5:48:12 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Upgrading Oracle REST Data Services schema to version 188.8.131.529 ... Log file written to D:\Oracle\RestDataService\ords.184.108.40.2061.13.24\logs\ordsupgrade_2016-02-07_174812_00362.log ... Log file written to D:\Oracle\RestDataService\ords.220.127.116.111.13.24\logs\ordsupgrade_2016-02-07_174812_00422.log Feb 07, 2016 5:48:13 PM oracle.dbtools.installer.Installer upgradeORDS INFO: Completed upgrade for Oracle REST Data Services version 18.104.22.1681.13.24. Elapsed time: 00:00:08.175 Enter 1 if you wish to start in standalone mode or 2 to exit :2 D:\Oracle\RestDataService\ords.22.214.171.1241.13.24>