Installing APEX 3.1
Database Preparation
- Check that dba_lock exists. If not, run
sqlplus / as sysdba
@?/rdbms/admin/catblock
- Create tablespace APEX
CREATE TABLESPACE apex
DATAFILE ‘/uxx/oradata/xxxx/apex01.dbf’ SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K SEGMENT SPACE MANAGEMENT AUTO;
- check that shared_pool_size is at least 100M
- check that system tbs has at least 85mb free
- Check that Oracle Text is already installed
Select * from dba_registry;
- If not, let’s install it then
sqlplus / as sysdba
@?/ctx/admin/catctx.sql ctxsys SYSAUX TEMP NOLOCK
where ctxsys is the install schema, SYSAUX is the default tablespace, Temp is temp tablespace for that user,
and NOLOCK instructs the script to not lock the account when the install is complete (lock after!)
– not install the language bit (UK for uk,or US for us)
connect ctxsys/ctxsys
@?/ctx/admin/defaults/drdefuk.sql file (for UK).
- Check that Oracle Text is already installed
Select * from dba_registry;
CONTEXT
Oracle Text
10.2.0.3.0 VALID
01-DEC-2008 09:46:01 SERVER
SYS CTXSYS
VALIDATE_CONTEXT
Install Oracle HTTP Server.
vi /u01/app/oracle/oraInst.loc_10g_httpd
inventory_loc=/u01/app/oracle/oraInventory_10g_httpd
inst_group=oinstall
mkdir –p =/u01/app/oracle/oraInventory_10g_httpd
export ORACLE_HOME=/u01/app/oracle/httpd/10.2.0
Find the companion CD
./runInstaller –invPtrLoc /u01/app/oracle/oraInst.loc_10g_httpd
Select Product to Install: Oracle Database 10g Companion Products 10.2.0.1.0 ( do not select HTML DB)
Target directory: /u01/app/oracle/httpd/10.2.0
Don’t forget to select Apache to install
Sort out images
mkdir –p :/u01/app/oracle/httpd/10.2.0/Apache/apex_images
scp –pr xx:/u01/app/oracle/httpd/10.2.0/Apache/apex_images/images .
ln -s /u01/app/oracle/httpd/10.2.0/Apache/apex_images/images
/u01/app/oracle/httpd//10.2.0/Apache/Apache/htdocs/i
Setup DAD
vi /u01/app/oracle/httpd/10.2.0/Apache/modplsql/conf/dads.conf
alias ‘i’ “/u01/app/oracle/httpd/10.2.0/Apache/apex_images/images”
AddType text/xml xbl
AddType text/x-component htc
<Location /pls/apex_ucig04>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_downloadd
PlsqlDatabaseConnectString hostname:1550:DB_UAT.UK.HIBM.HSBC ServiceNameFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword APEX_PUBLIC_USER
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
</Location>
Managing Apache services
/u01/app/oracle/httpd/10.2.0/opmn/bin/opmnctl stopall
Start OPMN service
/u01/app/oracle/httpd/10.2.0/opmn/bin/opmnctl startall
Check Status
/u01/app/oracle/httpd/10.2.0/opmn/bin/opmnctl status
Processes in Instance: IAS-X-nsudd142.6299
——————-+——————–+———+———
ias-component | process-type | pid | status
——————-+——————–+———+———
HTTP_Server | HTTP_Server | 19197 | Alive
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
To stop and restart HTTP_Server component
cd /u01/app/oracle/httpd/10.2.0/opmn/bin
./opmnctl stopproc ias-component=HTTP_Server
opmnctl: stopping opmn managed processes…
./opmnctl startproc ias-component=HTTP_Server
opmnctl: starting opmn managed processes…
To restart
./opmnctl restartproc ias-component=HTTP_Server
opmnctl: restarting opmn managed processes…
Install APEX
cd to apex media directory
check that LD_LIBRARY_PATH is set correctly
sqlplus / as sysdba
@apexins apex apex TEMP /i/
Check that installation is finished successfully
SELECT STATUS FROM DBA_REGISTRY WHERE COMP_ID = ‘APEX’;
This should show VALID.
If it has been unsuccessful, normally you are left with status of LOADING.
If installation failed, to start again
ALTER SESSION SET CURRENT_SCHEMA = FLOWS_020000;
exec flows_020000.wwv_flow_upgrade.switch_schemas (’FLOWS_030100′,’FLOWS_020000′);
DROP USER FLOWS_030100 CASCADE; (might require a shutdown force restrict if hangs)
Then restart with apexins again
Change APEX admin password
cd to apex media
sqlplus / as sysdba
@apxchpwd.sql (and enter new password)
URL
http://hostname:7777/pls/apex/apex_admin
for users
http://hostname:7777/pls/apex/
Checking port inside db:
select dbms_xdb.gethttpport from dual;
To set a new port:
exec dbms_xdb.sethttpport(7780)
To disable:
exec dbms_xdb.sethttpport(0)
Maintenance
How to make sure apache gets restarted automatically ….