mod_jk download ?

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

cheeang69

mod_jk download ?

Postby cheeang69 » Sat Nov 26, 2005 5:54 am

Hi

Where can I download the Mod_jk from scalix website ?

Cheer

mephisto

Postby mephisto » Sat Nov 26, 2005 10:46 am

mod_jk should be part of your distribution.

hydrospace
Posts: 54
Joined: Tue Mar 01, 2005 11:44 am
Location: Leipzig, germany
Contact:

Postby hydrospace » Sun Nov 27, 2005 5:18 am

I guess mod_jk is not a part of the distribution. You should download it at:

http://tomcat.apache.org/connectors-doc/

Select binaries for already compiled version for selected platforms or for most cases like RedHat EL 4.0 release sources. You have to compile those sources at the system which should run this connector...

Cheers


Stefan

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Nov 28, 2005 4:10 pm

Using the JK Connector and Compression

The JK connector is an Apache plugin module that uses fast sockets to
send traffic to Tomcat over a given port. This technique used to be
called "AJP13" and is in fact known by that name in the Tomcat
configuration.

mod_jk is a replacement to the dated mod_jserv. It is a completely new
Tomcat-Apache plug-in that handles the communication between Tomcat and
Apache. The Apache mod_jk connector allows the Scalix Web Access (SWA)
and Admin Console (SAC) Tomcat services to be served to the client using
Apache to 'Front' the connection. The benefits in using mod_jk include:

• Running SWA and SAC on port 80
• Ability to use Apache's gzip compression to increase client
performance, especially over slow connections
• Ability to use Apache's mod_ssl for SSL encryption

For more information about mod_jk see
http://jakarta.apache.org/tomcat/tomcat ... howto.html.

Prerequisites and Assumptions
• You have downloaded and installed Sun's Java JDK per the Scalix
installation guide. (Do not use the java versions included on the SuSE
distributions cds.)
• You have mod_jk.so 1.2.14 compiled for your OS. See
http://www.apachetomcat.com/apache20-to ... odjk-linux

To configure the mod_jk plug-in for Scalix

1. Copy mod_jk.so to

/usr/lib/httpd/modules/

2. Create a file called jk.conf in

/etc/httpd/conf.d/

and insert the following information between <snip> and </snip> and
modifiy as appropriate for your environment.

<snip>
# simple configuration for apache (for AJP connector, modul mod_jk.so)
LoadModule jk_module modules/mod_jk.so
<IfModule mod_jk.c>


JkWorkersFile
/var/opt/tomcat/jakarta-tomcat-5.0.28/conf/workers.properties
JkLogFile /var/opt/tomcat/jakarta-tomcat-5.0.28/logs/mod_jk.log


# Log level to be used by mod_jk
JkLogLevel info


# The following line makes apache aware of the location of
# the /webmail context
Alias /webmail "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/webmail"
<Directory "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/webmail">
Options FollowSymLinks
DirectoryIndex index.jsp
allow from all
</Directory>


# the /sac context
Alias /sac "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/sac"
<Directory "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/sac">
Options FollowSymLinks
DirectoryIndex index.jsp
allow from all
</Directory>


# the /caa context
Alias /caa "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/caa"
<Directory "/var/opt/tomcat/jakarta-tomcat-5.0.28/webapps/caa">
Options FollowSymLinks
DirectoryIndex index.jsp
allow from all
</Directory>


# The following line mounts all JSP files


JkMount /webmail/* ajp13
JkMount /sac/* ajp13
JkMount /caa/* ajp13


</IfModule>
</snip>



3. (If using RHEL 3 or 4 or FC 4 skip this step.) Create a file called deflate.conf in

/etc/httpd/conf.d/

and insert the following information between <snip> and </snip>.

<snip>
# mod_deflate setup
LoadModule deflate_module modules/mod_deflate.so

<IfModule mod_deflate.c>
<Location />
AddOutputFilterByType DEFLATE text/xml text/html text/css
AddOutputFilterByType DEFLATE application/x-javascript
</Location>
</IfModule>
</snip>

4. Create a file called workers.properties in

$TOMCAT_CONF_DIR
(e.g. /var/opt/tomcat/jakarta-tomcat-5.0.28/conf)

and insert the following information between <snip> and </snip> and
modify as appropriate for your environment.

<snip>
# workers.properties -
#
# This file provides jk derived plugins with the needed information to
# connect to the different tomcat workers. Note that the distributed
# version of this file requires modification before it is usable by a
# plugin.
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to do is un-comment and modify the first three
# properties, i.e. workers.tomcat_home, workers.java_home and ps.
# Most of the configuration is derived from these.
#
# When you are done updating workers.tomcat_home, workers.java_home and ps
# you should have 3 workers configured:
#
# - An ajp12 worker that connects to localhost:8007
# - An ajp13 worker that connects to localhost:8009
# - A jni inprocess worker.
# - A load balancer worker
#
# However by default the plugins will only use the ajp12 worker. To have
# the plugins use other workers you should modify the worker.list property.
#
#

# OPTIONS ( very important for jni mode )

#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=/var/opt/jakarta-tomcat-5.0.28/

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/java/j2sdk1.4.2_09/

#
# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#

#
#------ DEFAULT worket list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
# Add 'inprocess' if you want JNI connector
worker.list=ajp13
# , inprocess


#
#------ DEFAULT ajp12 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp12 and of type ajp12
# Note that the name and the type do not have to match.
#
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
#
# 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.ajp12.lbfactor=1

#
#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# 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=localhost
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

#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13


#
#------ DEFAULT JNI WORKER DEFINITION---------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named inprocess and of type jni
# Note that the name and the type do not have to match.
#
worker.inprocess.type=jni

#
#------ CLASSPATH DEFINITION -----------------------------------------
#---------------------------------------------------------------------
#

#
# Additional class path components.
#
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar

#
# Setting the command line for tomcat.
# Note: The cmd_line string may not contain spaces.
#
worker.inprocess.cmd_line=start

# Not needed, but can be customized.
#worker.inprocess.cmd_line=-config
#worker.inprocess.cmd_line=$(workers.tomcat_home)$(ps)conf$(ps)server.xml
#worker.inprocess.cmd_line=-home
#worker.inprocess.cmd_line=$(workers.tomcat_home)

#
# The JVM that we are about to use
#
# This is for Java2
#
# Windows
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
# IBM JDK1.3
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so
# Unix - Sun VM or blackdown
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so

#
# And this is for jdk1.1.X
#
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll


#
# Setting the place for the stdout and stderr of tomcat
#
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

#
# Setting the tomcat.home Java property
#
#worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)

#
# Java system properties
#
# worker.inprocess.sysprops=java.compiler=NONE
# worker.inprocess.sysprops=myprop=mypropvalue

#
# Additional path components.
#
# worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin
#
</snip>

5. Edit $TOMCAT_CONF_DIR/server.xml
(e.g. /var/opt/tomcat/jakarta-tomcat-5.0.28/conf/server.xml)

Look for

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->

and make sure

<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" />

is uncommented.

6. Restart Apache

service httpd restart

7. Restart Tomcat

service tomcat restart


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 3 guests