This page is an archive of my old blog. Please visit DavidTucker.net for my current blog.
This site is no longer being maintained and commenting is disabled.

RHEL 4 as a Webserver – Part 2

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:

CODE:
  1. 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

CODE:
  1. rpm -e java-1.4.2-gcj-compat-1.4.2.0-27jpp

4. Install the 32-bit JVM Package

CODE:
  1. 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
  2. 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)

CODE:
  1. ./coldfusion-macr-linux.bin.fixed

6. Edit Apache Connector Builder

CODE:
  1. vi /opt/coldfusionmx7/bin/connectors/apache_connector.sh

The File Should Read as Follows:

CODE:
  1. #!/bin/sh
  2.  
  3. #
  4. # Configure the Apache connector.
  5. #       -dir should be the *directory* which contains httpd.conf
  6. #       -bin should be the path to the apache *executable*
  7. #       -script should be the path to the script which is used to
  8. #               start/stop apache
  9. #
  10. #../../runtime/bin/wsconfig \
  11. /opt/coldfusionmx7/runtime/bin/wsconfig \
  12.         -server coldfusion \
  13.     -ws apache \
  14.         -dir /etc/httpd/conf \
  15.         -bin /usr/sbin/httpd \
  16.         -script /usr/sbin/apachectl \
  17.         -coldfusion \
  18.         -v
  19.  
  20. exit $#
  21. ## END FILE

Then run:

CODE:
  1. ./apache_connector.sh

Errors will still occur.

7. Start Coldfusion

CODE:
  1. /opt/coldfusionmx7/bin/coldfusion start

It will say that the Apache Connector Failed

8. Manually Complile the Apache Connector Module (Props to this guy)

CODE:
  1. cd /opt/coldfusionmx7/runtime/lib/
  2. unzip wsconfig.jar
  3. cd connectors/src
  4. vi myScript.sh

The file should read as follows:

CODE:
  1. #!/bin/bash
  2. export CFMX=/opt/coldfusionmx7/runtime
  3. export APACHE_PATH=/usr/
  4. export APACHE_BIN=$APACHE_PATH/sbin
  5.  
  6. #CFMX connector path eg $CFMX/runtime/lib/wsconfig/1
  7. export CFMX_CONNECTOR=$CFMX/lib/wsconfig/1
  8.  
  9. #stop apache
  10. $APACHE_BIN/apachectl stop
  11.  
  12. ${APACHE_BIN}/apxs -c -Wc,-w -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR}  mod_jrun20.c \
  13.                 jrun_maptable_impl.c  jrun_property.c  jrun_session.c platform.c \
  14.                 jrun_utils.c jrun_mutex.c  jrun_proxy.c  jrun_ssl.c
  15.  
  16. ${APACHE_BIN}/apxs -i -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun20.la
  17.  
  18. strip   $CFMX_CONNECTOR/mod_jrun20.so
  19. # END FILE

CODE:
  1. chmod 755 myScript.sh
  2. ./myScript.sh

9. Stop Coldfusion

CODE:
  1. /opt/coldfusionmx7/bin/coldfusion stop

10. Edit Coldfusion Start Up Script

CODE:
  1. vi /opt/coldfusionmx7/bin/coldfusion

The file should have the following lines commented out as shown(roughly around Line 84):

CODE:
  1. #[ -f "$CF_DIR/bin/cfmx-connectors.sh" ] && {
  2.         #
  3.         #       echo "======================================================================"
  4.         #       echo "Running the ColdFusion MX 7 connector wizard"
  5.         #       echo "======================================================================"
  6.  
  7.         #       sh $CF_DIR/bin/cfmx-connectors.sh && {
  8.         #               mv -f $CF_DIR/bin/cfmx-connectors.sh $CF_DIR/bin/cfmx-connectors-run.sh
  9.         #       }
  10.         #}

11. Start Apache and Coldfusion

CODE:
  1. service httpd restart
  2. /opt/coldfusionmx7/bin/coldfusion start




Comments are closed.