This manuel should be followed for new installations and upgrades affecting the first two numbers of the version (4.2 to 5.0) are done by doing a full installation. If the first two numbers of the version are not affected (5.0.0 to 5.0.1) you must download and apply a patch, rather than do the full installation.
Prereq
- Installation of Oracle Enterprise Linux
- Installation of Oracle Database Server
Setup
Download the APEX software.
Unzip the software either on your client PC, if you intend to install it from there using the SQL*Plus client on your PC, or on the database server if you intend to install it from there. The latter will be more efficient as you will reduce the network traffic between the SQL*Plus client and the database server.
Create a new tablespace to act as the default tablespace for APEX.
1 |
CREATE TABLESPACE apex DATAFILE SIZE 10M AUTOEXTEND ON NEXT 1M; |
Installation
Change directory to the directory holding the unzipped APEX software.
1 |
oracle> cd /home/oracle/apex |
Connect to SQL*Plus as the SYS user and run the “apexins.sql” script, specifying the relevant tablespace names and image URL.
1 2 3 4 |
SQL> CONN sys@db1 AS SYSDBA SQL> -- @apexins.sql tablespace_apex tablespace_files tablespace_temp images SQL> SQL> @apexins.sql APEX APEX TEMP /i/ |
Once complete, change the admin password by running the “apxchpwd.sql” scripts as the SYS user.
1 2 |
SQL> CONN sys@db1 AS SYSDBA SQL> @apxchpwd.sql |
Create the APEX_LISTENER
and APEX_REST_PUBLIC_USER
users by running the “apex_rest_config.sql” script.
1 2 |
SQL> CONN sys@db1 AS SYSDBA SQL> @apex_rest_config.sql |
OHS Configuration
Change the password and unlock the APEX_PUBLIC_USER
account. This will be used for any Database Access Descriptors (DADs).
1 |
SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY myPassword ACCOUNT UNLOCK; |
If you don’t want the password to expire you will need to create a new profile with password expiration disabled and assign it to the user.
Create a DAD in the OHS:
- Log into EM (http://server:port/em)
- From the tree select “Farm_DomainName > Web Tier > ohs1”
- On the resulting page select “Oracle HTTP Server > Administration > Advanced Configuration”
- From the dropdown list slect “dads.conf” and click the “Go” button.
- Edit the “dads.conf” file, adding an entry like that shown below, then click the “Apply” button.
123456789101112131415161718<Location /apex>Order deny,allowPlsqlDocumentPath docsAllowOverride NonePlsqlDocumentProcedure wwv_flow_file_mgr.process_downloadPlsqlDatabaseConnectString pdb1 TNSFormatPlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8PlsqlAuthenticationMode BasicSetHandler pls_handlerPlsqlDocumentTablename wwv_flow_file_objects$PlsqlDatabaseUsername APEX_PUBLIC_USERPlsqlDefaultPage apexPlsqlDatabasePassword myPasswordPlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorizePlsqlPathAlias rPlsqlPathAliasProcedure wwv_flow.resolve_friendly_urlAllow from all</Location> - Select the “Oracle HTTP Server > Control > Restart” option.
- Click the resulting “Restart” button.
- Once restarted, click the “Close” button.
Alternatively, edit the “dads.conf” file directly. For the OHS that comes with Forms and Reports Services, this is located here “$FR_INST/config/OHS/ohs1/mod_plsql/dads.conf”. Once amended, remember to restart the HTTP server.
1 |
$ $FR_INST/bin/opmnctl restartproc process-type=OHS |
Copy the APEX images to your Oracle HTTP Server.
1 |
$ cp -R /tmp/apex/images $FR_INST/config/OHS/ohs1/htdocs/apex_images |
Make them available from the “/i/” alias by adding the following alias to the virtual host defined in the “ssl.conf” or “httpd.conf” file in the “$FR_INST/config/OHS/ohs1” directory.
1 |
Alias /i/ "/u01/app/oracle/middleware/FR_inst/config/OHS/ohs1/htdocs/apex_images/" |
APEX should now be available from a URL like “http://machine:port/apex”.
Embedded PL/SQL Gateway (EPG) Configuration
Run the “apex_epg_config.sql” script, passing in the base directory of the installation software as a parameter.
1 2 |
SQL> CONN sys@db1 AS SYSDBA SQL> @apex_epg_config.sql /home/oracle |
Unlock the ANONYMOUS
account.
1 |
SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK; |
If this is an upgrade to an existing APEX installation, you will also have to run the following script, to update the images.
1 |
SQL> @apxldimg.sql /home/oracle |
Check the port setting for XML DB Protocol Server.
1 2 3 4 5 6 7 8 9 |
SQL> SELECT DBMS_XDB.gethttpport FROM DUAL; GETHTTPPORT ----------- 0 1 row selected. SQL> |
If it is set to “0”, you will need to set it to a non-zero value to enable it.
1 2 3 4 5 |
SQL> EXEC DBMS_XDB.sethttpport(8080); PL/SQL procedure successfully completed. SQL> |
APEX should now be available from a URL like “http://machine:port/apex”.
Network ACLS
If your APEX installation needs to contact other servers on the network, you will need to create the appropriate ACLs to allow account to the network services.
For more information see:
- Application Express Documentation Release 5.0
- Oracle Application Express Installation Guide Release 5.0
Please let me know if this manual ‘Installation Apex 5.0.1’ was usefull to you. If there are errors or you have suggestions regarding this manual, please let me know.
No rights can be derived from this manual
Regards,
Maarten