Kamis, 22 Desember 2011

Install APEX 4.1 on Oracle XE 11g

Oracle XE 11g sebenarnya telah ter-install APEX 4, kalau anda lihat pada user list maka akan ada user :ANONYMOUS, FLOWS_FILES, APEX_PUBLIC_USER dan APEX_040000.
Pastikan user ANONYMOUS ada, karena user ini yang akan dipakai dalam EPG, untuk OHS APEX_PUBLIC_USER yang akan dipakai. gambar dibawah setelah anda berhasil install oracle XE 11g



Lakukan langkah2 berikut:
  1. Lakukan Setup Requirement DB
    • Checking the shared_pool_size of the Target Database login ke database memakai user SYS as SYSDAB
    • SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='100M' SCOPE=spfile;
      SQL> SHUTDOWN
      SQL> STARTUP
      
    • PL/SQL Web Toolkit: bisa di skip karena kita memakai oracle XE 11g j
  2. Tutup HTTP port yang telah dipakai:8080 menjadi 0
  3. SQL> EXEC DBMS_XDB.SETHTTPPORT(0);
    
  4. Extract file ke dalam folder c:\apex41 setelah berhasil akan ada folder apex disitu
  5. Pindah ke working directory :
  6. cd c:\apex41\apex
    
  7. Panggil sqlplus dan login sysbagai SYS:
  8. Lakukan instalasi APEX: catatan untuk rekomendasi buatlah tablespace yg baru menggantikan SYSAUX
  9. @apexins SYSAUX SYSAUX TEMP /i/
    
  10. Tunggu proses sampai selesai : boleh bikin kopi dulu trus rokok'an kalo anda merokok hehehe
  11. Reviewing a Log of an Installation Session: file Install_tanggal.log pastikan ada log berikut
  12. Thank you for installing Oracle Application Express. Oracle Application Express is installed in the APEX_040100 schema.
  13. Verifying the Validity of an Oracle Application Express Installation: Pastikan hasilnya VALID
  14. SELECT STATUS FROM DBA_REGISTRY
    WHERE COMP_ID = 'APEX';
    
  15. Change the Password for the ADMIN Account: masih login sebagai SYS
  16. @apxchpwd
    
  17. Configure the Embedded PL/SQL Gateway
    • Running the apex_epg_config.sql Configuration Script: working dir masih c:/apex41/apex
    • @apex_epg_config SYSTEM_DRIVE:\TEMP
      
    • Updating the Images Directory: working dir masih c:/apex41/apex
    • @apxldimg.sql c:\apex41
      
    • Verifying the Oracle XML DB HTTP Server Port
    • SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
      
    • Enabling Oracle XML DB HTTP Server
    • EXEC DBMS_XDB.SETHTTPPORT(8080);
      
  18. Enable Network Services in Oracle Database 11g
  19. DECLARE
    ACL_PATH VARCHAR2(4000);
    ACL_ID RAW(16);
    BEGIN
    -- Look for the ACL currently assigned to '*' and give APEX_040100
    -- the "connect" privilege if APEX_040100 does not have the privilege yet.
    SELECT ACL INTO ACL_PATH 
    FROM DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    -- Before checking the privilege, ensure that the ACL is valid
    -- (for example, does not contain stale references to dropped users).
    -- If it does, the following exception will be raised:
    --
    -- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040100'
    -- ORA-06512: at "XDB.DBMS_XDBZ", line ...
    --
    SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
    FROM XDB.XDB$ACL A, PATH_VIEW P
    WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND EQUALS_PATH(P.RES, ACL_PATH) = 1;
    DBMS_XDBZ.ValidateACL(ACL_ID);
    IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040100','connect') IS NULL THEN
    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,'APEX_040100', TRUE, 'connect');
    END IF;
    EXCEPTION
    -- When no ACL has been assigned to '*'.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml','ACL that lets power users to connect to everywhere','APEX_040100', TRUE, 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
    END;
    /
    COMMIT;
    
  20. Post Installation Tasks for Upgrade Installations
    • Remove Prior Oracle Application Express Installations
    • DROP USER APEX_040000 CASCADE;
    • Fix Invalid ACL in Oracle Database 11g
    • EXEC DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE('power_users.xml', 'APEX_040000');
    • Ubah default profile menjadi unlimited semua, life time dan lock untuk 11g ini wajib dilakukan agar setelah 180 hari user ANONYMOUS tidak di-lock, tau buatlah profile baru dengan unlimited life time
  21. Test Drive : http://127.0.0.1:8080/apex/

Sumber :
Oracle® Application Express
Installation Guide
Release 4.1
E21673-03

Tidak ada komentar :

Posting Komentar