GNU/Linux, OracleMay 16, 2006 3:51 am

Finally i have successfully installed PHP5, lighttpd web server and oracle XE on Debian. These following steps below :
1. Install the following packages :
- php5
- php5-common
- libxml2-dev
- lighttpd
- libssl-dev
- libpcre3-dev
- libbz2-dev
- libdb4.4-dev
- libmagic1
2. Download oracle-xe debian package from http://oss.oracle.com/debian
3. Install oracle-xe package using dpkg -i. You will be prompted for several questions.
4. Get PHP5 source package to /usr/src :
# cd /usr/src
# apt-get source php5
5. Get into PHP5 source directory
6. Set ORACLE_HOME environment variable
# export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
7. Run configure script below :
# ./configure –enable-fastcgi –enable-force-cgi-redirect –with-oci8=$ORACLE_HOME –prefix=/usr –enable-memory-limit –disable-debug –with-regex=php –disable-rpath –disable-static –with-pic –with-layout=GNU –with-pear=/usr/share/php –enable-calendar –enable-sysvsem –enable-sysvshm –enable-sysvmsg –enable-track-vars –enable-trans-sid –enable-bcmath –with-bz2 –enable-ctype –with-db4 –with-iconv –enable-exif –enable-filepro –enable-ftp –with-gettext –enable-mbstring –with-pcre-regex=/usr –enable-shmop –enable-sockets –enable-wddx –disable-xml –with-expat-dir=/usr –with-xmlrpc –enable-yp –with-zlib –without-pgsql –with-kerberos=/usr –with-openssl=/usr –with-zip=/usr –enable-dbx –with-mime-magic=/usr/share/file/magic.mime –with-exec-dir=/usr/lib/php4/libexec –without-mm –with-mysql –without-sybase-ct –enable-sigchild
5. Compile the source :
# make && make install
6. Edit file /etc/lighttpd/conf-available/10-fastcgi.conf
Modif line ‘”bin-path” => “/usr/bin/php4-cgi”‘ to ‘”bin-path” => “/usr/bin/php”‘
Add line below to “bin-environment” :
“ORACLE_HOME” => “/usr/lib/oracle/xe/app/oracle/product/10.2.0/server”
7. Enable fastcgi module
# lighty-enable-mod
Enter “fastcgi” as answer to script. This will create symlink for /etc/lighttpd/conf-available/10-fastcgi.conf to /etc/lighttpd/conf-enable/10-fastcgi.conf
8. Reload lighttpd
# /etc/init.d/lighttpd force-reload
9. What are you waiting for? now …test it :)

OracleMay 12, 2006 6:59 am

Application Express bawaan Oracle XE ternyata mempunyai fungsi yang mirip dengan phpMyAdmin nya mySQL. Interfacenya juga bagus dan cukup fungsional. Namun aplikasi ini hanya bisa diakses melalui localhost aja, biasanya melalui address http://127.0.0.1:8080/apex. Hal ini seringkali membuat repot DBA apabila ia ingin maintain Oracle secara remote.

Dengan sedikit trik, kita bisa membuat aplikasi ini bisa diakses melalui mesin remote. Trik ini adalah dengan memanfaatkan fitur port forwarding nya ssh. Prinsipnya kita membuat mapping port 8080 di mesin DB Server ke port local di mesin remote. Berikut ini command nya untuk aplikasi ssh under Linux :

ssh -L [host /ip DB Server] [port AppExpress]:localhost:[port remote]

Berikut ini contohnya untuk membuat mapping port Application Express sehingga bisa diakses melalui mesin remote pada port 8181 :

ssh -L 172.18.0.212 8080:localhost:8181

Setelah itu coba akses URL http://localhost:8181/apex dari web browser. Untuk user windows, anda bisa mencoba putty sebagai pengganti ssh di Linux.