# HOW TO: Install Coldfusion MX 7 With Apache

## frameRATE

EDIT: 9/10/2006 - I'm going to be doing a fresh install on my server this weekend, so I'll post back if this tutorial is still valid and make any necessary changes if I can...

(This guide was written because the ColdFusion support for version 7 (and even prior) was SO sparse. Some info taken from other posts (credit given below)

EDIT 9/28: This was written before apache has been changed to follow "normal" config options. Be aware. I'll update this if I have time at a later date.

===================================

HOW TO INSTALL COLDFUSION MX 7 WITH APACHE !

===================================

This guide will tell you how to install ColdFusion MX 7 Under Apache with gentoo. It assumes you already have Apache installed via the normal 'emerge apache' command, didn't change any of the default directories/install files for apache, no version of ColdFusion previously installed, and makes no assumptions about what database you will use.

If you don't have apache installed, search the forums. There are already plenty of installation guides for setting up your own apache server...

Step One:

Download The Coldfusion Installer from http://www.macromedia.com/cfusion/tdrc/index.cfm?product=coldfusion (coldfusion-70-lin.nin)

Step Two:

You need to make sure the file is executable:

```
 chmod +x coldfusion-70-lin.bin
```

Step Three: 

Add a user cfm to run the server (this is optional if you know what you're doing)

```
(as root)

useradd cfm
```

Note, make sure this user is in a group that has permissions to the /wwwroot folder! Otherwise actions like CFFILE won't upload properly (took me a while to realize the issue here...)

and link gentoo's apache2.conf to the normal httpd.com

```
ln -s /etc/apache2/conf/apache2.conf /etc/apache2/conf/httpd.conf
```

Step Four: 

We're going to run the coldfusion installer

```
./coldfusion-70-lin.bin
```

During the install process:

```

===============================================================================

Choose Locale...

----------------

  ->1- English

CHOOSE LOCALE BY NUMBER: 1
```

```

Install Type

------------

If you do not have a serial number, select either 30-day trial or Developer 

Edition.

  ->1- Install new version of ColdFusion MX with a serial number

    2- 30-day trial

    3- Developer Edition

Installation Choice: 2
```

```

Installer Configuration

-----------------------

What kind of installation do you want?

  ->1- Server configuration

    2- Multiserver configuration

    3- J2EE configuration (EAR file)

    4- J2EE configuration (WAR file)

Please select one of the following options: 1

```

```

Macromedia ColdFusion MX 7 (server configuration) Installed

-----------------------------------------------------------

You cannot install the server configuration of Macromedia ColdFusion MX 7 if it is already installed on this computer.

Is there already a server configuration of Macromedia ColdFusion MX 7 installed on this computer?

    1- Yes

  ->2- No

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:

   : 2

```

(system init is for SUSE and Redhat (as far as I know). So we remove it as shown. I'm also going to remove the other two options because they seem to break the install (installer will lock up on last tier. If anyone knows a workaround, please post:

```

Sub-component installation

--------------------------

The following options are available for installation.

An option with "[X]" in front will be installed and an option with "[ ]" will 

not.  Choosing an option will toggle it on or off

[X] 1) Getting Started Experience, Tutorials, & Documentation

[X] 2) ColdFusion MX 7 Search Services

[X] 3) Start ColdFusion on system init

    4) Continue with installation

Select an option: 3

Sub-component installation

[X] 1) Getting Started Experience, Tutorials, & Documentation

[X] 2) ColdFusion MX 7 Search Services

[ ] 3) Start ColdFusion on system init

    4) Continue with installation

Select an option: 2

Sub-component installation

[X] 1) Getting Started Experience, Tutorials, & Documentation

[ ] 2) ColdFusion MX 7 Search Services

[ ] 3) Start ColdFusion on system init

    4) Continue with installation

Select an option: 1

Sub-component installation

[ ] 1) Getting Started Experience, Tutorials, & Documentation

[ ] 2) ColdFusion MX 7 Search Services

[ ] 3) Start ColdFusion on system init

    4) Continue with installation

Select an option: 4

```

```

Choose Install Folder

---------------------

Select the directory in which to install Macromedia ColdFusion MX 7.

Directory:

  Default Install Folder: /opt/coldfusionmx7

ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT

      : /opt/coldfusionmx7 

INSTALL FOLDER IS: /opt/coldfusionmx7

   IS THIS CORRECT? (Y/N): y

```

```

Existing ColdFusion Installation?

---------------------------------

The installer could not determine if there was an earlier version of ColdFusion on this machine.  If there is a previous version of ColdFusion installed your settings can be migrated.  

Is there an earlier version of ColdFusion on this machine?

    1- Yes

  ->2- No

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:

   : 2
```

This part is key. We're not going to configure apache here, as gentoo has changed the location of the default apache files...

```

Configure Web Servers

---------------------

Please configure your web server(s).  If you do not configure a web server the 

built-in web server will be used on port 8500 or the next available port.

    1- Add Web Server Configuration

  ->2- Continue with installation

Choice: 2

```

I've seen a lot of people have problems with using nobody, so we need to have a real shell user here (I chose user 'cfm'):

```

Runtime User

------------

Enter the name of the runtime user.   This user must exist already on the system.

User Name: (DEFAULT: nobody): cfm

```

I think this part is obvious:

```
Administrator Password

----------------------

Enter the password that you will use to control access to the ColdFusion MX 

Administrator.

This field is required.

Password:    

Confirm Password:    
```

This part I'm not sure about... I've always chose "No" but if anyone is successful with "Yes" let me know, I'll update that guide.

```
RDS Password

------------

The ColdFusion Remote Development Service (RDS) lets developers using 

Macromedia tools remotely connect to this server for development purposes.

If this is a production server, Macromedia recommends that you disable RDS.  

Note, however, that disabling RDS also disables the directory browsing applets 

in the ColdFusion Administrator and some of the  functionality in the Report 

Designer.

Enable RDS (required for Report Builder and DW Extensions) (Y/N)

   : N

```

Almost done..

```

Installation Confirmation

-------------------------

Installation Type:

  Server configuration

Licensing:

  30-day trial

Installation Directories:

  Product: /opt/coldfusionmx7

  Web root: /opt/coldfusionmx7/wwwroot

Server Information:

  Web Server: Built-in Web Server

  Port: 8500

  Search Service: installed

  Sample Apps: installed

  RDS: disabled

Disk Space Information (for Installation Target):

  Required: 401,412,655 bytes

  Available: 42,593,136,640 bytes

PRESS <ENTER> TO CONTINUE: 
```

If all goes well, you should get this screen:

```
Installation Complete

---------------------

You have successfully completed the first step in installing Macromedia 

ColdFusion MX 7.

To continue with your installation, go to /opt/coldfusionmx7/bin and type 

"./coldfusion start" to start your server.

Once the server is started log in to the Configuration Wizard at 

http://[machinename]:8500/CFIDE/administrator/index.cfm

PRESS <ENTER> TO EXIT THE INSTALLER: 

```

Step 5: 

Now we're at the fun part...

```
cd /opt/coldfusionmx7/bin

./coldfusion start
```

Will give this error:

```
ln: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

ps: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Starting ColdFusion MX 7...

The ColdFusion MX 7 server is starting up and will be available shortly.

sleep: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory

ps: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

There has been an error starting ColdFusion MX 7, please check the logs.

```

This one really kicked my ass, until I found -Blade- 's post on his install...https://forums.gentoo.org/viewtopic-t-312113-start-0-postdays-0-postorder-asc-highlight-coldfusion.html

Here's the fix. First make sure you have "sys-libs/lib-compat" installed

```
emerge lib-compat
```

Next we're going to edit the coldfusion file (/opt/coldfusionmx7/bin/coldfusion):

```
nano -w /opt/coldfusionmx7/bin/coldfusion
```

to this: (thanks to - Blade -)

```

#!/bin/sh 

# chkconfig: 345 90 14 

# description: starts the ColdFusion MX server 

PATH=/usr/xpg4/bin:/bin:/sbin:/usr/bin:/usr/sbin:$PATH 

CONNECTOR="" 

RUNTIME_USER="cfm"    # must be a real shell user 

JAVA_HOME="/opt/coldfusionmx7/runtime/jre" 

JAVA_EXECUTABLE="/opt/coldfusionmx7/runtime/jre/bin/java" 

DOCROOT="/opt/coldfusionmx7/wwwroot" 

CF_DIR="/opt/coldfusionmx7" 

ID=`id -u` 

if [ ! $ID -eq 0 ]; then 

        echo "You must be root to start ColdFusion MX." 

        exit 1 

fi 

cfstart() { 

        [ -f $CF_DIR/bin/jvm.config ] || { 

                ln -s $CF_DIR/runtime/bin/jvm.config $CF_DIR/bin/jvm.config 

        } 

        if [ "$OS" = "HPUX" ]; then 

                ps -e | grep -e [c]fmx7 > /dev/null 2>&1 && { 

                echo "ColdFusion MX 7 is already running" 

                echo exiting 

                exit 2 

        } 

                else 

                ps -e | grep -w [c]fmx7 > /dev/null 2>&1 && { 

                echo "ColdFusion MX 7 is already running" 

                echo exiting 

                exit 2 

        } 

        fi 

        echo "Starting ColdFusion MX 7..." 

        eval $CFSTART >> $CF_DIR/logs/cfserver.log 2>&1 

        echo "The ColdFusion MX 7 server is starting up and will be available shortly." 

        # Insert a sleep statement to give the server a few moments. 

        sleep 12 

        if [ "$OS" = "HPUX" ]; then 

                ps -e | grep -e [c]fmx7 > /dev/null 2>&1 || { 

                echo "There has been an error starting ColdFusion MX 7, please check the logs." 

                exit 1 

        } 

            else 

                ps -e | grep -w [c]fmx7 > /dev/null 2>&1 || { 

                echo "There has been an error starting ColdFusion MX 7, please check the logs." 

                exit 1 

        } 

           fi 

        [ -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 

                } 

        } 

        echo "======================================================================" 

        echo "ColdFusion MX 7 has been started." 

        echo "ColdFusion MX 7 will write logs to $CF_DIR/logs/cfserver.log" 

        echo "======================================================================" 

} 

cfstop() { 

        if [ "$OS" = "HPUX" ]; then 

        ps -e | grep -e [c]fmx7 > /dev/null 2>&1 || { 

                echo "ColdFusion MX 7 does not seem to be currently running" 

                return 

        } 

        else 

        ps -e | grep -w [c]fmx7 > /dev/null 2>&1 || { 

                echo "ColdFusion MX 7 does not seem to be currently running" 

                return 

        } 

            fi 

        echo "Stopping ColdFusion MX 7, please wait" 

        eval $CFSTOP 

        sleep 10 

        if [ "$OS" = "HPUX" ]; then 

        ps -e | grep -e [c]fmx7 > /dev/null 2>&1 && { 

                echo "The ColdFusion MX 7 server seems to be hanging, will stop non-gracefully" 

                ps -e | grep -e [c]fmx7 | awk '{print $1}' | xargs kill -9 > /dev/null 2>&1 

                sleep 2 

        } 

        else 

        ps -e | grep -w [c]fmx7 > /dev/null 2>&1 && { 

                echo "The ColdFusion MX 7 server seems to be hanging, will stop non-gracefully" 

                ps -e | grep -w [c]fmx7 | awk '{print $1}' | xargs kill -9 > /dev/null 2>&1 

                sleep 2 

        } 

        fi 

        if [ "$OS" = "HPUX" ]; then 

        ps -e | grep -e [c]fmx7 > /dev/null 2>&1 && { 

                echo "There are some very stubborn ColdFusion MX 7 processes that will not die, please kill the following PIDs by hand: " 

                ps -e | grep -e [c]fmx7 | awk '{print $1}' 

                echo exiting 

                exit 1 

        } 

        else 

        ps -e | grep -w [c]fmx7 > /dev/null 2>&1 && { 

                echo "There are some very stubborn ColdFusion MX 7 processes that will not die, please kill the following PIDs by hand: " 

                ps -e | grep -w [c]fmx7 | awk '{print $1}' 

                echo exiting 

                exit 1 

        } 

        fi 

        echo "ColdFusion MX 7 has been stopped" 

} 

case `uname` in 

        SunOS) 

                OS=Solaris 

                LD_LIBRARY_PATH="$CF_DIR/lib:$CF_DIR/lib/_solaris/bin" 

                CFSTART='su $RUNTIME_USER -c "PATH=$PATH:$CF_DIR/runtime/bin; export PATH; LD_LIBRARY_PATH=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $CF_DIR/runtime/bin; nohup $CF_DIR/bin/cfmx7 -jar cfusion.jar -autorestart -start coldfusion &"' 

                CFSTOP='su $RUNTIME_USER -c "PATH=$PATH:$CF_DIR/runtime/bin; export PATH; cd $CF_DIR/runtime/bin; $CF_DIR/bin/cfmx7 -jar cfusion.jar stop coldfusion"' 

        ;; 

        HP-UX) 

                OS=HPUX 

                CFSTART='su $RUNTIME_USER -c "PATH=$PATH:$CF_DIR/runtime/bin; export PATH; cd $CF_DIR/runtime/bin; nohup $CF_DIR/bin/cfmx7 -jar cfusion.jar -autorestart -start coldfusion &"' 

                CFSTOP='su $RUNTIME_USER -c "PATH=$PATH:$CF_DIR/runtime/bin; export PATH; cd $CF_DIR/runtime/bin; $CF_DIR/bin/cfmx7 -jar cfusion.jar stop coldfusion"' 

        ;; 

        Linux) 

                OS=Linux 

                LD_LIBRARY_PATH="$CF_DIR/lib:$CF_DIR/lib/_ilnx21/bin" 

                CFSTART='su $RUNTIME_USER -c "export PATH=$PATH:$CF_DIR/runtime/bin; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; cd $CF_DIR/runtime/bin; nohup $CF_DIR/bin/cfmx7 -jar cfusion.jar -autorestart -start coldfusion &"' 

                CFSTOP='su $RUNTIME_USER -c "env -i; cd $CF_DIR/runtime/bin; $CF_DIR/bin/cfmx7 -jar cfusion.jar stop coldfusion"' 

        # Some Java JVMs (both from Sun and IBM) don't work with the new floating stack 

        # feature of the i686 version of glibc.  Force glibc to use the deprecated stack model. 

        # Check if the OS is SuSE8.1 - if it is, do not use the deprecated stack model. 

#       SUSEFLAG=`grep 'SuSE Linux 8.1\|UnitedLinux 1.0' /etc/SuSE-release /etc/UnitedLinux-release /etc/UnitedLinux-release 2> /dev/null` 

#        if [ ! "$SUSEFLAG" ]; then 

#                LD_ASSUME_KERNEL=2.2.5 

#                export LD_ASSUME_KERNEL 

#        fi 

        ;; 

        *) 

        echo "Your OS: `uname` is unsupported" 

        echo "exiting" 

        exit 1 

        ;; 

esac 

ARG=$1 

[ -z "$ARG" ] && ARG=usage 

case $ARG in 

        start) 

                cfstart 

        ;; 

        stop) 

                cfstop 

        ;; 

        restart) 

                echo "Restarting ColdFusion MX 7..." 

                cfstop 

                cfstart 

        ;; 

        status) 

                if [ -x "$CF_DIR/bin/cfstat" ]; then 

                        shift 

                        $CF_DIR/bin/cfstat $@ 

                else 

                        echo "$0: $CF_DIR/bin/cfstat no such file" 

                fi 

        ;; 

    wsconfig) 

        WSCONFIG_JAR=$CF_DIR/runtime/lib/wsconfig.jar 

        if [ $# -eq 0 ]; then 

            # no arguments so display built-in help from wsconfig.jar 

            $JAVA_EXECUTABLE -jar $WSCONFIG_JAR -help 

            break 

        else 

            # brief help 

            if [ "$2" = "help" ]; then 

                echo "To configure a webserver connector you must specify the -ws and -dir options." 

                echo "If configuring Apache it is recomended that you also specify the -bin and " 

                echo "-script options." 

                echo "" 

                echo "To list all configured webserver connectors use the -list option." 

                echo "To remove a configured webserver connector use the -r option with the " 

                echo "-ws and -dir options." 

                echo "To remove all webserver connectors use the -uninstall option." 

                echo "To upgrade all installed webserver connectors use the -upgrade option." 

                echo "" 

                echo "For more detailed help see $0 $1." 

            fi 

            break 

        fi 

        # pass on all args to wsconfig.jar 

        shift 

        $JAVA_EXECUTABLE -jar $WSCONFIG_JAR $@ -coldfusion 

    ;; 

        *) 

                echo "Usage:$0 (start|stop|restart|status|wsconfig)" 

        ;; 

esac 

exit 0 

```

Step 6: 

Now start the standalone server:

```
/opt/coldfusionmx7/bin/coldfusion start
```

Yay! It works! At this point, you can view your server at "localhost:8500/CFIDE/administrator/index.cfm" (assuming you're installing on localhost. This is the standalone server, which doesn't do you much good if you want to install with Apache support. So let's continue...

(This part had me bashing my head against the wall for a while, until I figured it out... It's actually really easy..)

Step 7: 

We're going to install the apache connectors.. just replace framerate.info with whatever your domain or IP is ...

```
/opt/coldfusionmx7/bin/coldfusion wsconfig -host framerate.info -server coldfusion -ws Apache -dir /etc/apache2/conf  -coldfusion -v -bin /usr/sbin/apache2 -script /etc/init.d/apache2
```

Now just copy over the CFIDE and cfdocs directories

```
 cp -r /opt/coldfusionmx7/CFIDE/ /var/www/localhost/htdocs/

cp -r /opt/coldfusionmx7/cfdocs/ /var/www/localhost/htdocs/

```

Step 8: 

Now all that's left is open a web browser to:

http://127.0.0.1/CFIDE/administrator/index.cfm

and run the config (automated) and now you're good to go! Coldfusion is installed on your system!

If you want / directories to autoload index.cfm files, add this to your apache2.conf

```

DirectoryIndex index.html, index.cfm
```

(as well as index.php or any others you want do act as index pages)

Now restart your servers and you're good to go!

```
/etc/init.d/apache2 restart
```

and

```
/opt/coldfusionmx7/bin/coldfusion restart
```

Good luck everyone! Post any comments or errors here!

===============

credits

===============

howto by framerate

using information obtained from:

-Blade- : https://forums.gentoo.org/viewtopic-t-312113.html

bitter : https://forums.gentoo.org/viewtopic-t-150729.html

macromedia docs: http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/js/html/wwhelp.htm

(if I forgot anyone, please let me know!)[/quote][/code]

----------

## frameRATE

if while installing, everything goes well until you try to log in to the administrator and see:

 *Quote:*   

> The Graphing service is not available.

 

This can be fixed by "emerge xorg", since you're missing a file called "libXp.so.6" (thanks arma). 

I didn't want to emerge xorg on my server, and chances are you don't either. But it fixes it. If you have another suggestion to how to fix this, please post it.

----------

## r0nn1ef

I found a post on another forum explaining what causes this. Apparently, you have to have some of the X-11 libraries installed. I modified my Fedora Core 3 installation to include the optional X libraries and the developer libraries and my CF 7 works fine now.

http://www.talkingtree.com/blog/index.cfm?mode=entry&entry=8CABEC95-50DA-0559-A0ECFA201B3621EB

----------

## rutski89

What is different about your ./bin/coldfusion file? All I know of is the commenting of these few lines:

```
#       SUSEFLAG=`grep 'SuSE Linux 8.1\|UnitedLinux 1.0' /etc/SuSE-release /etc/UnitedLinux-release /etc/UnitedLinux-release 2> /dev/null` 

#        if [ ! "$SUSEFLAG" ]; then 

#                LD_ASSUME_KERNEL=2.2.5 

#                export LD_ASSUME_KERNEL 

#        fi 
```

 If I comment those lines out in my default coldfusion file, it will hang when I do ./coldfusion start. However, if I copy and paste yours, it works  :Very Happy: 

I tried to diff my coldfusion file against yours, but it wasn't very helpful. I don't want to search the file by hand, so If you know any other differences, please let me know.

I like to know whats going on with my box in all possible places, please... will you appease my obsessive compulsiveness?

P.S. Thanks for the great tutorial; although, I've not yet gotten to the apache2 part on account of this issue.

----------

## frameRATE

Honestly, I'm not sure either. I did the same thing you did, edited my own coldfusion file and couldn't get it to work. But then I started over from scratch and just cut and pasted the one from -Blade- and it worked..

Odd, huh? I'll take a look again later to see if I can spot it...

Glad you liked the tutorial!

----------

## thijsj

thanks for the explenation

had idd a problem while installing at the last tier  :Razz: 

coldfusion now is installed but i can't start the server

```
Cubewano ~ # /opt/coldfusionmx7/bin/coldfusion start

Starting ColdFusion MX 7...

```

anybody an idee??

al the rest is correctly installed, (i think  :Wink: )

----------

## Yann|ck

This is not just the commented lines, but also the part in "Linux":

```
        Linux)

                OS=Linux

                LD_LIBRARY_PATH="$CF_DIR/lib:$CF_DIR/lib/_ilnx21/bin"

                CFSTART='su $RUNTIME_USER -c "export PATH=$PATH:$CF_DIR/runtime/bin; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; cd $CF_DIR/runtime/bin; nohup $CF_DIR/bin/cfmx7 -jar cfusion.jar -autorestart -start coldfusion &"'

                CFSTOP='su $RUNTIME_USER -c "env -i; cd $CF_DIR/runtime/bin; $CF_DIR/bin/cfmx7 -jar cfusion.jar stop coldfusion"'

```

Note the "su" parts.

----------

## frameRATE

I just upgraded my apache without thinking and my Coldfusion is broken. I'm going to look into fixing it this week, but if anyone has already fixed this, please post here.

----------

## frameRATE

Got it working.. just figure that /apache2/httpd.conf is now the default config file, just copy the JRUN settings from your old config into the bottom of the new /apache2/httpd.conf and restart. CF came back online for me.

----------

## amccarty

Has anyone tried with CFMX 7.1.

It seems that the cfmx7 executable was moved to $CF_DIR/runtime/bin

Calling that directly or symlinking it back to $CF_DIR/bin just gives me the following error

```
Exception in thread "main" java.util.zip.ZipException: No such file or directory

        at java.util.zip.ZipFile.open(Native Method)

        at java.util.zip.ZipFile.<init>(Unknown Source)

        at java.util.jar.JarFile.<init>(Unknown Source)

        at java.util.jar.JarFile.<init>(Unknown Source)

autorestart: Process died in less than 30 seconds; not restarting

```

This implies that it can't find the cfusion.jar file.  I can provide the CF_START a full path to the jar but nothing changes.

Any help is greatly appreciated.

----------

## amccarty

I figured it out.  The CFSTART and CFSTOP lines in the coldfusion script need to be changed as follows.

```

CFSTART='su $RUNTIME_USER -c "export PATH=$PATH:$CF_DIR/runtime/bin; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; cd $CF_DIR/runtime/bin; nohup $CF_DIR/runtime/bin/cfmx7 -jar jrun.jar -autorestart -start coldfusion &"'

CFSTOP='su -s /bin/sh $RUNTIME_USER -c "env -i; cd $CF_DIR/runtime/bin; $CF_DIR/runtime/bin/cfmx7 -jar jrun.jar stop coldfusion"'

```

Sorry for the noise.

----------

## frameRATE

I got it to work when updated from 7.0. Did you try a fresh 7.1 install?

----------

## amccarty

yes,  fresh install.

----------

## frameRATE

 *amccarty wrote:*   

> yes,  fresh install.

 

Well thanks for the post then =)

Hopefully it'll help someone!

----------

## heutger

Hi!

First many thanks for your work. I did a complete fresh install of 7.1 and I'd choosen to set the Apache as web server because of the conf "problem" has been corrected in newer apache versions from the portage tree, but run in trouble with the connector script. The log shows

 *Quote:*   

> /opt/cfmx/runtime/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

 

I'd choosen the folder /opt/cfmx for coldfusion instead of the default, should not be a problem.

Another question I want to ask you about the RDS and Search Services, did you test and run in trouble or didn't you test and just skip them out?

Thanks,

Christian

----------

## heutger

 *heutger wrote:*   

> Hi!
> 
> First many thanks for your work. I did a complete fresh install of 7.1 and I'd choosen to set the Apache as web server because of the conf "problem" has been corrected in newer apache versions from the portage tree, but run in trouble with the connector script. The log shows
> 
>  *Quote:*   /opt/cfmx/runtime/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory 
> ...

 

So to all although the confs are now as macromedia except, the installer script is still not working setting up the connectors. So there is always the need to install the connector manually following the instructions given in the first post. Now I got ColdFusion working, for users running a firewall you would need to add rules allowing connections from localhost to localhost AS WELL as from the official machine IP to the official machine IP, can be set to -i lo. I'm quite unsure if there are additional rules neccessary on other IPs if multi-IP environment, but the process "shooting" with SYNs the processes to start (really funny to follow the startup with netstat -ap | grep "cfmx") uses not localhost but the first official IP on my machine. If anyone get more information on that or how to handle in firewall rules more efficiently please post it here.

So still be happy to get a feedback on RDS and Search Services.

----------

## frameRATE

 *heutger wrote:*   

> Hi!
> 
> First many thanks for your work. I did a complete fresh install of 7.1 and I'd choosen to set the Apache as web server because of the conf "problem" has been corrected in newer apache versions from the portage tree, but run in trouble with the connector script. The log shows
> 
>  *Quote:*   /opt/cfmx/runtime/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory 
> ...

 

That sounds like it may have been the file that xorg-x11 provided (I talked about it in the "Graphing Services" post above. Do a google search to confirm.. it's been quite a while for me.

Also, whenever I did RDS installs, it was on the OLD apache config system and it would just lock up the installer. I'm thinking it might work now but I don't have a system to test a fresh install on.

If anyone can confirm or deny RDS works now, I can amend the tutorial.

----------

## canoba

has anyone gotten the verity search to install? i tried installing it seperatly and the installer just hangs at the very end of it. anyone have any luck?

----------

## incubator

I always keep getting errors during the installation.

I try to install CFMX 7.01

(file:coldfusion-701-lin.bin )

my java environment vars:

```

JDK_HOME=/home/merlidi/j4

JAVAC=/home/merlidi/j4/bin/javac

PATH=$PATH:/home/merlidi/j4/bin:/home/merlidi/j4/jre/bin

ROOTPATH="/home/merlidi/j4/bin:/home/merlidi/j4/jre/bin"

LDPATH="/home/merlidi/j4/jre/lib/i386/:/home/merlidi/j4/jre/lib/i386/native_threads/:/home/merlidi/j4/jre/lib/i386/server/:/home/merlidi/j4/jre/lib/i386/client/"

JAVA_HOME=/home/merlidi/j4

```

I have sun-jdk 1.4.2.11 installed , here is what  got from the log:

```

Expand Archive:           /tmp/3841.tmp/ant_bin_dir.zip

Status: ERROR

Additional Notes: ERROR - Problems occured with the expander of Z_/installers/CustomCode/includes/ant_bin_dir.zip's type.It said: error in opening zip file

Install File:             /tmp/3841.tmp/CFMX7 Ext-0_8_4.mxp

                          Status: ERROR

Install File:             /tmp/3841.tmp/CFReportBuilderInstaller.exe

                          Status: ERROR

o entry found: MakeExecutableAction_zg_ia_sf.jar

                          Status: ERROR

Install Uninstaller:      Macromedia ColdFusion MX 7 (Install All Uninstaller Components)

                          Status: ERROR

                          Additional Notes: ERROR - Error installing uninstaller: java.util.zip.ZipException: error in opening zip file

                                            ERROR - Failure to install Uninstaller executable: java.lang.NullPointerException

No entry found: MakeExecutableAction_zg_ia_sf.jar

                          Status: FATAL ERROR

Create LaunchAnywhere:    JRE_Install (Install All LaunchAnywhere Java Executable Components)

                          Status: ERROR

Install Merge Module:     Z:\installers\verity\mergemodules\search_linux.iam.zip

                          Status: ERROR

                          Additional Notes: ERROR - java.lang.NullPointerException

ANT Script Error:

                          Status: ERROR

                          Additional Notes: ERROR - configure-installers.xmljava.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.getFileUtils()Lorg/apache/tools/ant/util/FileUtils;

Modify Text File - Multiple Files: No target chosen

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate directory to be manipulated.  Deferring...

Install File:             /opt/coldfusionmx7/cfstat

                          Status: ERROR

Install File:             /opt/coldfusionmx7/cfinfo

                          Status: ERROR

Install File:             /opt/coldfusionmx7/coldfusion

                          Status: ERROR

Install File:             /opt/coldfusionmx7/cfmx-init.sh

                          Status: ERROR

Modify Text File - Single File:   cfstat

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   cfinfo

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   coldfusion

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   cfmx-init.sh

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

ANT Script Error:

                          Status: ERROR

                          Additional Notes: ERROR - standalone.xmljava.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/XMLValidateTask, method: createDTD signature: ()Lorg/apache/tools/ant/types/DTDLocation;) Incompatible argument to function

Install File:             /opt/coldfusionmx7/jrun-config.zip

                          Status: ERROR

Install File:             /opt/coldfusionmx7/license.txt

                          Status: ERROR

Install File:             /opt/coldfusionmx7/Readme.htm

                          Status: ERROR

ANT Script Error:

                          Status: ERROR

                          Additional Notes: ERROR - standalone.xmljava.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/XMLValidateTask, method: createDTD signature: ()Lorg/apache/tools/ant/types/DTDLocation;) Incompatible argument to function

Modify Text File - Multiple Files: No target chosen

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate directory to be manipulated.  Deferring...

ANT Script Error:

                          Status: ERROR

                          Additional Notes: ERROR - unix_basic_commands.xmljava.lang.VerifyError: (class: org/apache/tools/ant/taskdefs/optional/XMLValidateTask, method: createDTD signature: ()Lorg/apache/tools/ant/types/DTDLocation;) Incompatible argument to function

Modify Text File - Multiple Files: No target chosen

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate directory to be manipulated.  Deferring...

Modify Text File - Single File:   cfstat

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   cfinfo

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   coldfusion

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Single File:   cfmx-init.sh

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated.  Deferring...

Modify Text File - Multiple Files: No target chosen

                          Status: ERROR

                          Additional Notes: ERROR - Unable to locate directory to be manipulated.  Deferring...

```

I dont know why this hapened really, I have the packages zip and unzip installed 

does anyone know how these errors can be resolved? as I see many sites explaining how to install cfmx but not how to troubleshoot hte install   :Sad: 

----------

## incubator

ok, apparely this was due to a corrupt download....but now I get differfent errrors:

ServiceFactory unable to create Service of class coldfusion.license.OEMLicenseService (and a whole stacktrace)

the cfmx_mbean.jar is definitly there  had to unzip jrun_config.zip myself O_o ) and I even placedd it in all possible classpaths....

CFMX  is using the built in JRE so the /jre/lib/ext thing about MBeans is not applicable here....

----------

## VinnieNZ

Has anyone managed to get this to work with the latest version of ColdFusion?

I get the following errors when I try to install:

```

Preparing to install...

Extracting the JRE from the installer archive...

Unpacking the JRE...

Extracting the installation resources from the installer archive...

Configuring the installer for this system's environment...

awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Launching installer...

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

/tmp/install.dir.16145/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

```

Does anyone have any ideas as how to get this to compile.  I'm willing to provide additional information if required.[/code]

----------

## ragefan

 *VinnieNZ wrote:*   

> Has anyone managed to get this to work with the latest version of ColdFusion?
> 
> I get the following errors when I try to install:
> 
> ```
> ...

 

I found the answer on this page: http://www.talkingtree.com/blog/index.cfm/2006/4/5/Fedora-Core-5-Installlation-Guide

Basically, the "export LD_ASSUME_KERNEL=2.2.5" lines need to be commented out.

Whether doing a full install or using the updaters, this works:

```
# 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

```

I used previously installed 7.0.0 and have updated to both 7.0.1 and 7.0.2 using the updaters and did a full install on another machine using the 7.0.2 installer and this worked.

----------

## frameRATE

So apparently this tutorial isn't too good for the newer version of coldfusion. I'm trying to get it working using 702 (newest version) but when I try to visit localhost:8500/CFIDE/Administrator/index.cfm I get

```
500 Null
```

 (I hate this error....)

and when i try to run the connector script I see

```

thedeathstar justin # /opt/coldfusionmx7/bin/coldfusion wsconfig -host framerate.info -server coldfusion -ws Apache -dir /etc/apache2  -coldfusion -v -bin /usr/sbin/apache2 -script /etc/init.d/apache2

Could not connect to any JRun/ColdFusion servers on host framerate.info.

Possible causes:

o Server not running

  -Start Macromedia JRun4 or ColdFusion MX server

o Server running

  -JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall

   on server

  -host restriction in security.properties blocking communication with server

```

Any help would be appreciate so I can rewrite this tutorial

----------

## frameRATE

 *frameRATE wrote:*   

> So apparently this tutorial isn't too good for the newer version of coldfusion. I'm trying to get it working using 702 (newest version) but when I try to visit localhost:8500/CFIDE/Administrator/index.cfm I get
> 
> ```
> 500 Null
> ```
> ...

 

the problem was with my /etc/hosts file. I fixed that and it seems to be ok... I'm working on rewriting this tutorial for the 702 bin but I haven't had time to finish it yet... Sorry... the info is all here, though. Just scattered.

----------

## Klainn

I followed your guide this morning and I only needed to emerge lib-compat before running the cfml installer and do the following:

```
# 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 
```

and it worked fine for me. I am, however, not using apache and use the built-in webserver. I just change the port and select developer edition during install.

Still a good howto!

----------

## Amig

Hi! 

Would like to say thank you for this good how-to! it worked perfectly more or less. 

i was using the newest installer from adobe. and in the new version i didnt need to edit the start file. so that was very nice! 

And all those missing libs from graphics was easy to fix. i just emerged the libs the logs said was missing. so didnt need to get xorg or anything  :Smile: 

But in the howto it says you need to "cp -r /opt/coldfusionmx7/cfdocs/ /var/www/localhost/htdocs/" , in the new version i cant find any folder that is named cfdocs. 

is it the WEB-INF or webroot maybe? seems to work without it tho... 

Thanks again  :Smile: 

----------

## incubator

confirmed, version 7.0.2 with the LD-ASSUME_KERNEL commented works fine  :Smile: 

I thank everyone for their efforts in trying to get this to work, it helped me a lot!

----------

## frameRATE

I'm glad this tutorial still works for you guys, more or less. I'd like to get around to reupdating it, but work kept me insanely busy!

Keep adding tips and tricks here though, as it seems to be helping people!

----------

## PaulBain

Hi guys,

I'm having some trouble with adding the connectors to apache.

When I try I get the following:

```

intradev bin # ./coldfusion wsconfig -v -bin -coldfusion -host intradev -server coldfusion -ws Apache -dir /etc/apache2

./coldfusion: line 237: break: only meaningful in a `for', `while', or `until' loop

Found JRun server coldfusion at 127.0.0.1:2920

Could not find file -coldfusion

```

I moved the -v -bin -coldfusion around incase that was the problem but it wasnt

I'm installing on apache2 with httpd.conf in /etc/apache2. I'm also using the script provided by blade. I had the same problem with the origonal.

Anybody got any ideas?

I also noticed /usr/sbin/apache2 -script /etc/init.d/apache2  no longer works. Maybe it is this version.

I'm installing from coldfusion-70-lin.bin 

Thanks

Paul

----------

## XioXouS

First, thanks for the how to - very useful.

Second, I did this on a Hardened install, so here are some changes in the various places and some updates for current Gentoo config styles.

1) To fix the "graphing error" you can use modular X.  I  only needed the following packages.

```
emerge -av x11-libs/libXtst x11-libs/libXp sys-libs/lib-compat
```

2) This was absolutely necessary:

```
# 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
```

3) Java is one of those packages that doesn't play well with Pax.  The installer uses its own JRE that it unpacks to a directory based on a PID (which is often random on Hardened machines).  You can't edit the .bin too much or it won't unpack properly, so I ran ./coldfusion-702-lin.bin in one terminal and in another immediately ran 

```
while true; do chpax -m /tmp/install.dir.*/Linux/resource/jre/bin/*; done
```

.  Now the installer can run and you can go about your business.  As stated in Step 4.

4) Step 5 was wholly unnecessary for me.  Well, lib-compat was needed, but we did that in my Step 1.

5) Needed to add a chpax rule to /etc/conf.d/chpax for CF and it's JREs (Hardened only):

```
cf7="/opt/coldfusionmx7/runtime/{bin/cfmx7,jre/bin/java}"

MPROTECT_EXEMPT="${MPROTECT_EXEMPT} ${cf7}"
```

6) Here's a Gentoo style init script for coldfusion:

```

#!/sbin/runscript

# Copyright 1999-2007 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

opts="${opts} stats forcequit"

depend() {

        need net

        use mysql dns logger 

        before apache2

        after sshd

}

start() {

        ebegin "Starting ColdFusionMX7"

        /opt/coldfusionmx7/bin/coldfusion start 1>/dev/null \

        && /opt/coldfusionmx7/verity/k2/_ilnx21/bin/k2adminstart 1>/dev/null \

        && while ! ( netstat -n -a | grep -q '8500' ); do sleep 1; done

        eend $?

}

stop() {

        ebegin "Stopping ColdFusionMX7"

        /opt/coldfusionmx7/bin/coldfusion stop 1>/dev/null \

        && /opt/coldfusionmx7/verity/k2/_ilnx21/bin/k2adminstop 1>/dev/null

        eend $?

}

stats() {

        cd /opt/coldfusionmx7/bin/ \

        && ./coldfusion status

        #eend $?

}

forcequit() {

        ebegin "Forcing ColdFusionMX7 to stop"

        stop > /dev/null 2>&1

        /opt/coldfusionmx7/bin/coldfusion stop

        /opt/coldfusionmx7/verity/k2/_ilnx21/bin/k2adminstop

        #eend $?

}

```

forcequite and stats are extra options I found useful.

7) Rather than that big nasty step in step 7 we can make use of Gentoo's modular Apache config style:

/etc/apache2/modules.d/71_coldfusionmx7.conf

```

<IfDefine CF7>

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

            #JRunConfig ProxyRetryInterval 600

            #JRunConfig ConnectTimeout 15

            #JRunConfig RecvTimeout 300

            #JRunConfig SendTimeout 15

            AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf

            AddDirectoryIndex index.cfm

        </IfModule>

</IfDefine>

```

Now if you want to have Apache handle CF, just add "-D CF7" to APACHE2_OPTS in /etc/conf.d/apache2.

8) You can also probably do without any changes to your apache confs.  Perhaps an "Options +FollowSymLinks".

```
ln -s /opt/coldfusionmx7/wwwroot/cfide /var/www/localhost/html/cfide

ln -s /opt/coldfusionmx7/wwwroot/CFIDE /var/www/localhost/html/CFIDE

ln -s /opt/coldfusionmx7/wwwroot/cfdocs /var/www/localhost/html/cfdocs
```

Let me know if you have comments or questions.

----------

## Feday

Hi all,

I've just finished a second install using this post and like the first time it worked just fine. After taking some notes during the install, I've taken te liberty to add an updated version to the gentoo wiki.

Thanks to all,

Fed.

http://gentoo-wiki.com/HOWTO_Apache_with_Coldfusion_MX7

----------

## JoshFed

The boss has had enough of M$ IIS and so the migration begins.  I've followed frameRATE's tutorial and I can get into the administration page on port 8500.  I'm trying to get the apache connector connected?  I get the following, wonderful error:

```
./coldfusion wsconfig -host titan.thebeachcompany.com -server coldfusion -ws Apache -dir /etc/apache2 -coldfusion -v -bin /usr/sbin/apache2 -script /etc/init.d/apache2

Apache web server is not supported on Linux

```

Coldfusion version: 7,0,2,142559  

Gentoo: AMD64 2006.1

kernel: 2.6.19-gentoo-r5 #1 SMP

----------

## frameRATE

I'd like to install CFMX8 on my server again and update this tutorial. If I can find the time to do it (it's just a private dev box) I will and update things accordingly.

If anyone else is trying this, please post your success/failures here!

----------

## ducnguyenvn

Hi there,

Have anyone know whats Blade changed in /opt/coldfusionmx/bin/coldfusion file? I'm having the same issue after installing Cold Fusion 6.1. Do you guys think I can fix as way Blade did for ColdFusion 7?

Thanks.

----------

## frameRATE

Sorry, I've been out of the gentoo/CFML world for a few years... but maybe someone else here can help you!

----------

