Installing ColdFusion on a local Windows-based, Apache, server

Note: For information on installing, or upgrading to ColdFusion MX 7.0.1, see Installing ColdFusion MX 7.0.1 on a local Windows-based, Apache, server.

In this tutorial, we'll be working through an installation of ColdFusion MX 6.1, Developer's Edition, on a local, Windows-based, Apache server. On this server, we've setup Apache, PHP, and MySQL, but will also want to have the ability to work with ColdFusion code (however, not necessarily on the same sites that we'll be using PHP). We'll be doing this to experience a more corporate Web-programming language – corporate primarily because of the costs associated with ColdFusion.

From the marketing, we see that "the [ColdFusion MX 6.1] Developer Edition, [is] a fully functional server for local development purposes only that helps you learn ColdFusion MX 6.1 or deploy to third-party hosting providers. Access is limited to localhost and one remote IP address.".

We can download the Developer's Edition directly from Macromedia/Adobe - http://www.macromedia.com/software/coldfusionmx61/. However, you should know that the size of the download is over 150 MB. Also, as the above blurb notes, you most certainly cannot use the Developer's Edition on anything but a development machine. However, the code we write will work in a production environment.

Also note that you could download and install the current 7.x version of ColdFusion (again, Developer Edition) instead of ColdFusion 6.1. I'll be installing 6.1 simply because I'd like to work in the older environment for purposes of getting help, and helping others. Also, ColdFusion 7 is said, by Macromedia/Adobe, to be an easy upgrade. So, if 7 becomes the one we want to develop for, we can always make the switch.

Installing ColdFusion MX 6.1 Developer Edition

Once you've downloaded the beast of an installation file, you'll need to install it to use the installed and running Apache Web server. Once you launch the installer, you'll be able to choose a language (English in my case). Read the introduction, and read and agree to the license agreement.

On the next screen, Configure Installer, it will prompt you for a serial number, or will allow you to run the Developer Edition. On the next screen, we'll select Server configuration, followed by a screen asking us where to install ColdFusion MX. Leave this at the default directory of C:\CFusionMX.

Now, we'll have to select a Web server. We'll be configuring ColdFusion to use Apache here, so select Add. Select Apache, if it isn't already selected. In the Configuration Directory field, you'll want the conf folder in the Apache folder, which is probably something like C:\Program Files\Apache Group\Apache\conf. In the third field, Directory and file name of server binary, you'll need to tell CF where to find the Apache.exe, which is probably at C:\Program Files\Apache Group\Apache\Apache.exe (if you are using Apache 1.3.x). Click Ok now that the three fields are filled out, followed by a Next.

Now, we'll have to select the web root location for ColdFusion MX Administrator. This is used by ColdFusion to, interestingly enough, administer ColdFusion. We'll change this directory to our C:\home folder (which is what you've set the DocumentRoot value to, if you've been following along).

If you set DocumentRoot to something else, you'll want to make sure that you use that directory here as well.

If you're not sure what you're using for your directory, go to the Apache install directory and open the conf\httpd.conf file. For example, C:\Program Files\Apache Group\Apache\conf\httpd.conf. Next, do a search for DocumentRoot.

While you're here, you can also verify that this same directory is referred to a couple of lines down, which is "<Directory "c:/home">", where 'c:/home' is your DocumentRoot directory.

Thanks to Mike Bryce for pointing this out.

Finally, you'll be able to review the installation. Note that ColdFusion MX is going to take over 500 MB of space on your hard drive. This is, by far, the most demanding installation on our local Web server. Click Install to begin the installation.

Around two hours later (or actually in less than five minutes), ColdFusion MX 6.1 will be up and running. You'll probably notice a hit to the memory, because ColdFusion is quite the memory hog. We'll discuss this before we close this post.

Once you see the Installation Complete message, you'll be given the ColdFusion MX Administrator location. If you try to get to it now, however, you may be asked if you want to download the CFM file. Whoops – not a good thing. What we'll need to do is configure Apache to recognize CFM files.

Configure Apache for ColdFusion

Hopefully, you should be able to just restart Apache via the Services panel, and then visit http://localhost/CFIDE/administrator/index.cfm one more time. If you don't see the Configuration and Settings Migration Wizard, then you'll need to open the httpd.conf file (using either the Start menu or a shortcut you may have created), and do a search for mod_jrun. Verify that the line that contains this text, and "LoadModule", is not commented out with a # as the first character. If it is, remove the pound sign, save the file, and restart Apache. Hit http://localhost/CFIDE/administrator/index.cfm once again.

You can now do a search for DirectoryIndex, to verify that index.cfm has been added as a directory index. While you're here, you may also want to move it's placement up to after index.php, or even before if you'd like.

Configure ColdFusion

Now, visit http://localhost/CFIDE/administrator/index.cfm, and log in. You'll now be configuring ColdFusion settings. First, you'll have the option to disable RDS, which means absolutely nothing to me. An article on sitepoint, http://www.sitepoint.com/article/install-coldfusion-mx-windows/3, says that there's little harm on allowing this on a development server. For the widest experience, we'll leave this as is, and use the same password we just created, for simplicity's sake.

ColdFusion will then install ODBC Services, followed by asking you if you'd like to install example applications. Since this may be helpful, we'll go ahead and do so. These are installed in C:\home\cfdocs\exampleapps\. And with that, setup is complete. Press OK to load the ColdFusion Administrator (http://localhost/CFIDE/administrator/index.cfm).

At this point, if you've been doing so, you may want to make a backup copy of the httpd.conf file (in C:\Program Files\Apache Group\Apache\conf\). However, this is your call.

Now that we've installed ColdFusion, we can go about creating sites were we'll be developing with CF files. Remember that to do this you may want to add VirtualDirectory items into your httpd.conf file, and new IP mappings in your hosts file. For now, have some fun looking at the example applications.

Finally, before I close this conversation, one point to add. As I mentioned above, you may have noticed a hit to your available memory after installing ColdFusion MX 6.1. If you open Windows Task Manager and take a look at the processes, you may notice that jrun.exe is using well over 50 MB. If you open up Services and Stop ColdFusion MX Application Server, you'll notice that this item disappears.

Depending upon your system, and how often you'll be working with ColdFusion (or Apache for that matter), you may want to disable ColdFusion MX from beginning when your computer starts up.

If you're interested in doing this, open the Services panel. Next, right click on the item you would like to stop from starting up on startup, and select Properties. Here, on the General tab, change Startup type from Automatic to Manual (not Disabled). This will ensure that this service only starts up when you manually start it. Note that if I manually start ColdFusion it takes about 30 seconds. If I let it start on startup, it increases my startup time by a little more than that. Again, if you won't be doing heavy development with ColdFusion, or if you restart your computer on a regular basis, think about changing ColdFusion, or Apache, to startup when you start them.

On one final note, you may even want to stop these services when you're not actively developing with them. Not only will it save memory, it will also close any security holes that these programs may have – not that that is of major concern.

In a future post, we'll discuss how to hook up MySQL with ColdFusion.

View all of the steps to creating a local Web server, for development.