APEX 4.1 安裝

系統是從 Oracle 網站下載的VirtualBox Pre-built VM images。

所以它的作業系統是 Oracle Enterprise Linux,資料庫為 11gR1。

  # unzip /home/oracle/apex_4.1.1.zip

  # mv apex_4.1.1  apex41
  # chown -R oracle:oracle apex41

3、執行@apexins SYSAUX SYSAUX TEMP /i/
  # su - oracle
  $ cd /home/oracle/apex41   <--資料夾位置,一定要執行,原因下列說明。
  $ sqlplus /nolog
  SQL> connect / as sysdba   <--以SYS登入DB
  SQL> @apexins SYSAUX SYSAUX TEMP /i/  <--執行安裝
  注1:@apexins tablespace_apex tablespace_files tablespace_temp images
      tablespace_apex is the name of the tablespace for the Oracle Application Express application user.
      tablespace_files is the name of the tablespace for the Oracle Application Express files user.
      tablespace_temp is the name of the temporary tablespace.
      images  is the virtual directory for Oracle Application Express images. To support
              future Oracle Application Express upgrades, define the virtual image
               directory as /i/.
  注2:一開始安裝的時候,並沒有先到 APEX 的資料夾去執行apexins.sql,結果出現錯誤。
        $ cd $ORACLE_HOME/bin/
        $ ./sqlplus /nolog
        SQL> @/home/oracle/apex41/apexins sysaux sysaux temp /i/  <--指定路徑
        SP2-0310: unable to open file "coreins.sql"
4、啟用APEX_PUBLIC_USER(Unlocking the APEX_PUBLIC_USER Account)
  SQL> select username,account_status from dba_users where username='APEX_PUBLIC_USER' ;

  USERNAME                                    ACCOUNT_STATUS
  ------------------------------         --------------------------------
  APEX_PUBLIC_USER                          LOCKED
  如果 Account_STATUS 是 OPEN,則跳過此步驟
  SQL> alter user apex_public_user account unlock;
  SQL> alter user apex_public_user indentified by XXXXX;
6、接著安裝 apex_listener ,檔案可以從 Oracle 網站直接下載。
  # unizp apex_listener. -d apex_listener
  # chown -R oracle:oracle apex_listener
  # java -jar /home/oracle/apex_listener/apex.war
  INFO: Starting: /home/oracle/apex_listener/apex.war
  See: 'java -jar apex.war --help' for full range of configuration options
  INFO: Extracting to: /tmp/apex
  Enter the path to the directory containing the APEX static resources
       Example:  /Users/myuser/apex/images
     or press Enter to skip:     <--按鍵盤的Enter鍵
  INFO: Using classpath: file:/tmp/apex/apex/____embedded/start.jar:file:/tmp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/tmp/apex/apex/WEB-INF/lib/apex.jar:file:/tmp/apex/apex/WEB-INF/lib/xdb-11.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/je-4.0.103.jar:file:/tmp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/tmp/apex/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:file:/tmp/apex/apex/WEB-INF/lib/ojmisc.jar:file:/tmp/apex/apex/WEB-INF/lib/ucp.jar:file:/tmp/apex/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:
  INFO: Starting Embedded Web Container in: /tmp/apex
  Enter a username for the APEX Listener Administrator [adminlistener]:   <--按鍵盤的Enter鍵
  Enter a password for adminlistener:   <--輸入自訂的密碼
  Confirm password for adminlistener:   <--再輸一次自訂的密碼
  Enter a username for the APEX Listener Manager [managerlistener]:     <--按鍵盤的Enter鍵
  Enter a password for managerlistener:   <--輸入自訂的密碼
  Confirm password for managerlistener:   <--再輸一次自訂的密碼
  May 18, 2012 1:32:51 AM ____bootstrap.Deployer deploy
  INFO: Will deploy application path=/tmp/apex/apex/WEB-INF/web.xml
  May 18, 2012 1:32:52 AM ____bootstrap.Deployer deploy
  INFO: deployed application path=/tmp/apex/apex/WEB-INF/web.xml
  Using config file: /tmp/apex/apex-config.xml
  APEX Listener version :
  APEX Listener server info: Grizzly/1.9.18-o
  May 18, 2012 1:32:53 AM com.sun.grizzly.Controller logVersion
  INFO: Starting Grizzly Framework 1.9.18-o - Fri May 18 01:32:53 PDT 2012
  INFO: Please complete configuration at: http://localhost:8080/apex/listenerConfigure
  Database connection not yet configured