- https://www.oracle.com/tools/downloads/apex-212-downloads.html
Create a new tablespace to act as the default tablespace for APEX. Connect / as sysdba
-- For Oracle Managed Files (OMF). CREATE TABLESPACE apex DATAFILE SIZE 100M AUTOEXTEND ON NEXT 1M;
Change directory to the directory holding the unzipped APEX software.
$ cd /home/oracle/apex
SQL> CONN sys@pdb1 AS SYSDBA SQL> -- @apexins.sql tablespace_apex tablespace_files tablespace_temp images SQL> SQL> @apexins.sql APEX APEX TEMP /i/
SQL> CONN sys@pdb1 AS SYSDBA SQL> @apxchpwd.sqlIf you want to add the user silently, you could run the following code, specifying the required password and email.
BEGIN APEX_UTIL.set_security_group_id( 10 ); APEX_UTIL.create_user( p_user_name => 'ADMIN', p_email_address => 'me@example.com', p_web_password => 'PutPasswordHere', p_developer_privs => 'ADMIN' ); APEX_UTIL.set_security_group_id( null ); COMMIT; END; /
SQL> CONN sys@pdb1 AS SYSDBA SQL> @apex_rest_config.sql
SQL> CONN sys@pdb1 AS SYSDBA SQL> @apex_rest_config.sql ApexPassword1 ApexPassword2
If you want to use Oracle REST Data Services (ORDS) to front APEX, you can follow the instructions here.
If you want to use the Embedded PL/SQL Gateway (EPG) to front APEX, you can follow the instructions here. This is used for both the first installation and upgrades.
Run the "apex_epg_config.sql" script, passing in the base directory of the installation software as a parameter.
SQL> CONN sys@pdb1 AS SYSDBA SQL> @apex_epg_config.sql /home/oracle
SQL> CONN sys@cdb1 AS SYSDBA DECLARE l_passwd VARCHAR2(40); BEGIN l_passwd := DBMS_RANDOM.string('a',10) || DBMS_RANDOM.string('x',10) || '1#'; -- Remove CONTAINER=ALL for non-CDB environments. EXECUTE IMMEDIATE 'ALTER USER anonymous IDENTIFIED BY ' || l_passwd || ' ACCOUNT UNLOCK CONTAINER=ALL'; END; /
SQL> CONN sys@pdb1 AS SYSDBA SQL> SELECT DBMS_XDB.gethttpport FROM DUAL; GETHTTPPORT ----------- 0 1 row selected. SQL>
SQL> CONN sys@pdb1 AS SYSDBA 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".
Oracle HTTP Server (OHS) Configuration
If you want to use Oracle HTTP Server (OHS) to front APEX, you can follow the instructions here.
Change the password and unlock the APEX_PUBLIC_USER account. This will be used for any Database Access Descriptors (DADs).
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:
If you want to use Oracle HTTP Server (OHS) to front APEX, you can follow the instructions here.
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 pdb1 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 PlsqlPathAlias r PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url 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
$ cp -R /tmp/apex/images $FR_INST/config/OHS/ohs1/htdocs/apex_images
Alias /i/ "/u01/app/oracle/middleware/FR_inst/config/OHS/ohs1/htdocs/apex_images/"
No comments:
Post a Comment