Setting Mod Jk untuk Application Server JBoss Compiere
Februari 9, 2009
Mod Jk ( module java connector ) sebuah module yang digunakan untuk komunikasi antara apache dengan jboos. Module ini menggunakan protokol ajp13 yg berfungsi sebagai interface apache dengan jboss. disini saya akan menjelaskan konfigurasi mod jk untuk ubuntu dan fedora.
Pada Ubuntu :
download dan install mod jk : sudo apt-get install libapache2-mod-jk . Buat file workers.properties pada direktori /etc/apache2/. Tambahkan berikut :
worker.list=ajp13
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
worker.ajp13.port=8009
worker.ajp13.host=oracle
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# —-> lbfactor must be > 0
# —-> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1
#
# Specify the size of the open connection cache.
worker.ajp13.cachesize=10
Buka file /etc/apache2/mod-enabled/jk-load tambahkan baris berikut :
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress
JkRequestLogFormat “%w %V %T”
Buka file /etc/apache2/site-available/default
Tambahkan baris berikut :
<VirtualHost *:80>
ServerName namahost.com
ServerAlias namahost.com
JkMount /admin/* ajp13
JkMount /wstore/* ajp13
JkMount /apps/* ajp13
</VirtualHost>
Restart apache :
/etc/init.d/apache restart
Start application server JBos
$COMPIERE_HOME/utils/RUN_Server2.sh
Konfigurasi pada Fedora
konfigurasi pada fedora pada dasarnya hampir sama dengan ubuntu yang berbeda hanya peletakan konfigurasinya. Sekarang mulai konfigurasi :
1. download mod_jk dari situs2 terdekat
2. extract file hasil download
3. masuk ke direktori native
4. compile
./configure --with-apxs=/usr/local/apache/bin/apxs --with-java-home=$JAVA_HOME make make install
5. buka file conf apache /usr/local/apache2/conf/httpd.conf tambahkan baris berikut :
LoadModule jk_module modules/mod_jk.so
#
JkWorkersFile /usr/local/apache2/workers.properties
JkLogFile /usr/local/apache2/conf/mod_jk.log
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress
JkRequestLogFormat “%w %V %T”
JkLogLevel info
6. Buat file workers.properties pada direktori /usr/local/apache2/ dan tambahkan baris berikut :
worker.list=ajp13
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
worker.ajp13.port=8009
worker.ajp13.host=oracle
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# —-> lbfactor must be > 0
# —-> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1
#
# Specify the size of the open connection cache.
worker.ajp13.cachesize=10
7. Buka file /usr/local/apache2/conf/httpd.conf. Tambahkan baris berikut :
<VirtualHost *:80>
ServerName namahost.com
ServerAlias namahost.com
JkMount /admin/* ajp13
JkMount /wstore/* ajp13
JkMount /apps/* ajp13
</VirtualHost>
8. Restart apache
/etc/init.d/apache restart
9. Starts apps server Jboss
$COMPIERE_HOME/utils/RUN_Server2.sh
10. Buka browser untuk melihat hasil konfigurasi:
http://namahost/admin/
Entry Filed under: Server. .
Trackback this post | Subscribe to the comments via RSS Feed