SOLVED: ColdFusion MX 7 (CFMX7) on Fedora Core 5 (FC5) with all yum updates

I'm a bit of a Fedora newb but I'm pretty sure the packages I needed were: 
**Java** - There's plenty of other posts out there about java
httpd-2.2.2-1.2
glibc-2.4-11
compat-libstdc++-33-3.2.3-55.fc5
compat-libstdc++-296-2.96-135

I can't guarantee that this is the proper way things should be but I can say 
this worked for me and I now have a working copy of CFMX7 on my FC5 box with 
full yum updates.

(I think i've remembered every step here but you can post back if you're having 
trouble)

I'm assuming you've installed the downloaded binary using the following hack:

(make sure you get the '...ME_KERNEL/" > coldfusion-702-lin.bin' on one line or 
you'll get the .bin file outputted to your terminal!)

cd [whereever the .bin is]
cp coldfusion-702-lin.bin coldfusion-702-lin.bak
cat coldfusion-702-lin.bak | sed "s/export LD_ASSUME_KERNEL/#xport 
LD_ASSUME_KERNEL/" > coldfusion-702-lin.bin
../coldfusion-702-lin.bin

Follow the install instructions (when it asks for httpd paths copy the red hat 
ones)
The last instruction is outputted to the screen and asks you to start CFMX7. 
This will work but your apache connector will fail. This is where you need to 
follow these instructions:


1. service coldfusionmx7 stop
2. service coldfusionmx7 stop
3. cd /opt/coldfusionmx7/runtime/lib
4. unzip wsconfig.jar
5. cd connectors/src
6. nano mod_jrun20.h

Add the following to this file below the /* Apache includes */ block:

/* 1.3 backwards compat stuff */

#ifndef ap_copy_table

#define ap_copy_table apr_table_copy
#define ap_cpystrn apr_cpystrn
#define ap_destroy_pool apr_pool_destroy
#define ap_isspace apr_isspace
#define ap_make_array apr_array_make
#define ap_make_table apr_table_make
#define ap_null_cleanup apr_pool_cleanup_null
#define ap_palloc apr_palloc
#define ap_pcalloc apr_pcalloc
#define ap_psprintf apr_psprintf
#define ap_pstrcat apr_pstrcat
#define ap_pstrdup apr_pstrdup
#define ap_pstrndup apr_pstrndup
#define ap_push_array apr_array_push
#define ap_register_cleanup apr_pool_cleanup_register
#define ap_snprintf apr_snprintf
#define ap_table_add apr_table_add
#define ap_table_do apr_table_do
#define ap_table_get apr_table_get
#define ap_table_set apr_table_set
#define ap_table_setn apr_table_setn
#define ap_table_unset apr_table_unset

/* THIS LINE IS ADDITIONAL TO MY PREVIOUS POST */
#define ap_http_method(r) ap_http_scheme(r)

#endif /* defined(ap_copy_table) */

7. Save the file (ctrl-x, tap y, press enter)
8. nano mod_jrun20.c

Add the following (it's roughly line 23):

#include "jrun_utils.h"

/* ADDITION DJS 01.Oct.2006 */
#include "jrun_utils.c"
/* /ADDITION DJS 01.Oct.2006 */

#include <util_script.h>

9. Re-build the apache connector (i used a build.sh):

#!/bin/bash
#CFMX path eg: /opt/coldfusionmx
export CFMX=/opt/coldfusionmx7

#apache path eg: /usr/local/apache2
export APACHE_PATH=/usr/lib/httpd

#apache bin path eg: $APACHE_PATH/bin
export APACHE_BIN=/usr/sbin

#CFMX connector path eg $CFMX/runtime/lib/wsconfig/1
export CFMX_CONNECTOR=$CFMX/runtime/lib/wsconfig/1

${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_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

10. Check your jrun.xml and httpd.conf config I have included the relevant 
parts below:

<!-- ================== JRUN.XML ================== -->
  <service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
    <attribute name="activeHandlerThreads">8</attribute>
    <attribute name="minHandlerThreads">1</attribute>
    <attribute name="maxHandlerThreads">1000</attribute>
    <attribute name="mapCheck">0</attribute>
    <attribute name="threadWaitTimeout">300</attribute>
    <attribute name="backlog">500</attribute>
    <attribute name="deactivated">false</attribute>
    <attribute name="interface">*</attribute>
    <attribute name="port">51011</attribute>
    <attribute name="timeout">300</attribute>
    <!-- set this to false for multi-hosted sites -->
    <attribute name="cacheRealPath">false</attribute>
    <!--
    <attribute name="keyStore">{jrun.rootdir}/lib/keystore</attribute>
    <attribute name="keyStorePassword">changeit</attribute>
    <attribute name="trustStore">{jrun.rootdir}/lib/trustStore</attribute>
    <attribute 
name="socketFactoryName">jrun.servlet.jrpp.JRunProxySSLServerSocketFactory</attribute>
    -->
  </service>


/* ================== HTTPD.CONF ================== */

# JRun Settings
LoadModule jrun_module "/opt/coldfusionmx7/runtime/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/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl <optionally redirect to this URL on errors>
    AddHandler jrun-handler .cfm .cfc .cfml .jsp .jws
</IfModule>




Please note the:
   <attribute name="port">51011</attribute>
and
   JRunConfig Bootstrap 127.0.0.1:51011
lines must sync and your firewall must allow this connection.

Also make sure the:
    JRunConfig Serverstore 
"/opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store"

directive is ALL ON THE SAME LINE!

I was then able to view CF pages BUT i was getting errors like:

[Sun Oct 01 15:50:03 2006] [notice] jrApache[9232: 61701]  could not open 
"/opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store": Permission denied

in my /var/log/httpd/error_log

I don't know what this file does so this could be a security risk but I just 
did:

chmod 777 /opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store

to stop the errors.

I *think* I covered everything here :s

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: http://www.houseoffusion.com/groups/CF-Linux/message.cfm/messageid:4200
Subscription: http://www.houseoffusion.com/groups/CF-Linux/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.14

Reply via email to