| Compiling and Installing the Apache module for ColdFusionMX 7 from source code |
|
First of all, we need the source code. In my example, ColdFusionMX 7 was installed in /opt. In the 'lib' directory you'll find a file named 'wsconfig.jar'. This jar file holds the source of the coldfusion module needed for apache. Unzip this jar file, and change to the source directory.
|
cd /opt/jrun4/lib
unzip wsconfig.jar
cd connectors/src
|
|
Use the following script to build the connector from source. Depending on your ColdFusionMX 7 installation, you might need to change some paths.
|
#!/bin/bash
export CFMX=/opt/jrun4
export APACHE_PATH=/usr/
export APACHE_BIN=$APACHE_PATH/sbin
#CFMX connector path eg $CFMX/runtime/lib/wsconfig/1
export CFMX_CONNECTOR=$CFMX/lib/wsconfig/1
#stop apache
$APACHE_BIN/apachectl stop
${APACHE_BIN}/apxs -c -Wc,-w -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun20.c \
jrun_maptable_impl.c jrun_property.c jrun_session.c platform.c \
jrun_utils.c jrun_mutex.c jrun_proxy.c jrun_ssl.c
${APACHE_BIN}/apxs -i -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun20.la
strip $CFMX_CONNECTOR/mod_jrun20.so
|
|
In my example, I have put the above script in a file called 'script.sh'. Before executing this script, make sure that you'll have the required apache rpms.
|
# rpm -qa httpd httpd-devel
httpd-2.0.46-46.2.ent
httpd-devel-2.0.46-46.2.ent
#
|
|
Now that everything is in place, let's set the right permissions to our script and run it.
|
# chmod 0755 script.sh
# ./script.sh
... lots of data
#
|
|
Now that our module is ready, let's add the following lines to the httpd.conf.
|
# JRun Settings
LoadModule jrun_module /opt/jrun4/lib/wsconfig/1/mod_jrun20.so
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/jrun4/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51020
#JRunConfig Errorurl
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
|
|
Now everything should be ready for launching!
|
# cd /opt/jrun/bin
# nohup ./jrun start cfusion &
# service httpd start
|
|
This document is slightly based on this document. That document pointed me in the right direction, but left me with the following error:
|
Cannot load /opt/jrun/lib/wsconfig/1/mod_jrun20.so into
server: /opt/jrun/lib/wsconfig/1/mod_jrun20.so: undefined symbol: hexstrtol
|