RHEL 4 as a Webserver - Part 2
April 6th, 2007
Installing Coldfusion MX7 Enterprise on Redhat Enterprise 4 (64-bit) was more difficult than I would have imagined. Adobe has been a bit unclear about whether the 64-Bit of RHEL 4 is actually supported. However, with quite a bit of command line work and some bullying of the Java Virtual Machine - we can get it working properly.
(This assumes that you are trying to install Coldfusion MX7 on a Redhat ES/AS 4 (x86_64), and Apache 2.0.40+ but less than Apache 2.2.x)
1. Get the Coldfusion installer (either from CD or download from Adobe).
2. Perform the following action to fix the LD_ASSUME bug on the installer:
-
cat coldfusion-macr-linux.bin | sed "s/export LD_ASSUME/#xport LD_ASSUME/"> coldfusion-macr-linux.bin.fixed
3. Remove the 64-bit JVM package
-
rpm -e java-1.4.2-gcj-compat-1.4.2.0-27jpp
4. Install the 32-bit JVM Package
-
wget ftp://fr2.rpmfind.net/linux/fedora/core/updates/5/i386/java-1.4.2-gcj-compat-1.4.2.0-40jpp_83rh.4.i386.rpm
-
rpm -Uvh java-1.4.2-gcj-compat-1.4.2.0-40jpp_83rh.4.i386.rpm
5. Install Coldfusion (No initial errors should occur)
-
./coldfusion-macr-linux.bin.fixed
6. Edit Apache Connector Builder
-
vi /opt/coldfusionmx7/bin/connectors/apache_connector.sh
The File Should Read as Follows:
-
#!/bin/sh
-
-
#
-
# Configure the Apache connector.
-
# -dir should be the *directory* which contains httpd.conf
-
# -bin should be the path to the apache *executable*
-
# -script should be the path to the script which is used to
-
# start/stop apache
-
#
-
#../../runtime/bin/wsconfig \
-
/opt/coldfusionmx7/runtime/bin/wsconfig \
-
-server coldfusion \
-
-ws apache \
-
-dir /etc/httpd/conf \
-
-bin /usr/sbin/httpd \
-
-script /usr/sbin/apachectl \
-
-coldfusion \
-
-v
-
-
exit $#
-
## END FILE
Then run:
-
./apache_connector.sh
Errors will still occur.
7. Start Coldfusion
-
/opt/coldfusionmx7/bin/coldfusion start
It will say that the Apache Connector Failed
8. Manually Complile the Apache Connector Module (Props to this guy)
-
cd /opt/coldfusionmx7/runtime/lib/
-
unzip wsconfig.jar
-
cd connectors/src
-
vi myScript.sh
The file should read as follows:
-
#!/bin/bash
-
export CFMX=/opt/coldfusionmx7/runtime
-
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
-
# END FILE
-
chmod 755 myScript.sh
-
./myScript.sh
9. Stop Coldfusion
-
/opt/coldfusionmx7/bin/coldfusion stop
10. Edit Coldfusion Start Up Script
-
vi /opt/coldfusionmx7/bin/coldfusion
The file should have the following lines commented out as shown(roughly around Line 84):
-
#[ -f "$CF_DIR/bin/cfmx-connectors.sh" ] && {
-
#
-
# echo "======================================================================"
-
# echo "Running the ColdFusion MX 7 connector wizard"
-
# echo "======================================================================"
-
-
# sh $CF_DIR/bin/cfmx-connectors.sh && {
-
# mv -f $CF_DIR/bin/cfmx-connectors.sh $CF_DIR/bin/cfmx-connectors-run.sh
-
# }
-
#}
11. Start Apache and Coldfusion
-
service httpd restart
-
/opt/coldfusionmx7/bin/coldfusion start



Leave a Reply