Blogia
tecnolakis

Oracle Application Express (APEX) 4.2

 Installation

This procedure should be followed for new installations and upgrades affecting the first two numbers of the version (4.1 to 4.2) are done by doing a full installation. If the first two numbers of the version are not affected (4.2.5 to 4.2.6) you must download and apply a patch, rather than do the full installation.

Related articles.

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.

CREATE TABLESPACE apex DATAFILE '/u01/app/oracle/oradata/db11g/apex01.dbf'
SIZE 100M AUTOEXTEND ON NEXT 1M;

Installation

Change directory to the directory holding the unzipped APEX software.

$ 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.

SQL> CONN / 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.

SQL> CONN / AS SYSDBA
SQL> @apxchpwd.sql

Create the APEX_LISTENER and APEX_REST_PUBLIC_USER users by running the "apex_rest_config.sql" script.

SQL> CONN / 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).

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.
    <Location /apex>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString db11g TNSFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword myPassword
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow 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.

$ $FR_INST/bin/opmnctl restartproc process-type=OHS

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.

SQL> CONN / AS SYSDBA
SQL> @apex_epg_config.sql /home/oracle

Unlock the ANONYMOUS account.

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.

SQL> @apxldimg.sql /home/oracle

Check the port setting for XML DB Protocol Server.

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.

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. This is discussed here.

For more information see:

Hope this helps. Regards Tim...

0 comentarios