I’ve been attending a whole host of ColdFusion 10 Developer Week 2012 sessions this week, and got inspired to upgrade my development machine to run ColdFusion 10. I had previously been running CF9 (developer) and MAMP Pro 2.0.5. These instructions will allow you to remove CF9 and install CF10. Installing and configuring MAMP Pro is up to you.
Update: Added a note near the end of the instructions. Basically, make sure you edit the httpd.conf file in MAMP Pro or the changes may be overwritten.
Here’s the process I used to get everything setup and working properly:
- Backup any settings for your current web server setup (if any). Make sure you keep a copy of any config files – just in case.
- In the OS X System Preferences app, under Sharing, disable Web Sharing. You don’t want a competing installation of Apache to derail you.
- If you have ColdFusion 9 running, open the ColdFusionLauncher.app and shut down ColdFusion 9. Move the ColdFusion9 install directory out of /Applications, just to make sure it’s not in the way. Also, look in /Library/StartupItems and move the ColdFusion9 folder. Where you put these two folders doesn’t matter, but don’t put them in the same place since they’re name the same.
- Download and install MAMP Pro. I used all default options throughout the install process. For me, this resulted in two folders in my Applications folder: MAMP and MAMP Pro.
- Run MAMP Pro. The first time through, a MAMP PRO folder is created at /Users/username/Library/Application Support/appsolute/ that contains your MAMP PRO settings files. You will need this info in a minute.
- Make sure you can access the default website created by MAMP. I ended up creating a new folder for my web development. It is located at /Users/username/Documents/Websites. Make sure you replace username with your username. You will need this location in a bit too. Of course, you can change this location to be anywhere you like.
- Browse to /Users/username/Library/Application Support/appsolute/ and make a backup of httpd.conf right now. It may save you some potential grief.
- In MAMP Pro, Click the Stop button to turn off MAMP.
- Download ColdFusion 10 from Adobe. You will need to sign in with an Adobe account, but you can create one if you don’t already have one. There’s only one version for OS X now, which simplifies things. Version 9 came in 32 bit and 64 bit versions – there’s no distinction anymore on OS X
- Mount the DMG you downloaded and run the ColdFusion 10 Installer.
- On the Introduction screen, click Next.
- On the License Agreement screen, click I accept the terms of the License Agreement and then click Next.
- On the Install Type screen, click the Developer Edition checkbox, and then click Next. No license is required to install the developer edition.
- On the Installer Configuration screen, select Server configuration, and then click Next.
- On the Subcomponent Installation screen, select the subcomponents you want (i selected everything) and then click Next.
- On the Secure Profile screen, you can choose whether or not you want to turn on RDS or not. I did, so I checked Enable and then entered my IP address subnet (ie. 10.2.2.*). Click Next.
- On the Remote Component Administrator Credentials screen (which I think only shows up if you enable the Secure Profile option in the previous step), enter an Admin username (admin), and a password. Adobe really wants you to use a secure password, so just follow the prompts if you don’t enter something hard enough. Make a note of it. Click Next.
- On the Select Installation Directory screen, click Next (unless, of course, you want to install it elsewhere – make a note of where you install it if this is the case).
- On the Earlier Versions of Adobe ColdFusion Installed screen, select No, and then click Next.
- On the Configure Web Servers/Websites screen, select Configure web server connector for ColdFusion, and then click Add. The following step won’t succeed, but you have to do it anyway to continue the install process.
- In the Add Web Server Configuration window, select Web Server Apache.
- For the Configuration directory, click the … button and browse to /Users/username/Library/Application Support/appsolute/. Click on, but don’t open the MAMP PRO directory, and then click Select. If you click into the MAMP PRO directory, it will choose the wrong path for you.
- For the Directory and file name of server binary, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find httpd and click select.
- For the Directory and file name of server control script, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find apachectl and click select.
- Click OK.
Click Next to finish the Configure Web Servers/Websites screen.
- On the Configure OpenOffice screen, select whether or not you want to install the OpenOffice connector, and then click Next.
- On the Administrator Credentials screen, enter a username and password for the ColdFusion Administration console (same password rules as the Secure Profile step earlier), and then click Next.
- On the Server Updates screen, choose whether or not to check for updates. The intention is for Adobe to better keep you informed of updates and patches to ColdFusion, Java, etc…. Click Next.
- On the Current User Password screen, enter your OS X user password, and then click Next.
- On the Pre-installation Summary screen, verify your choices (what little Adobe chooses to review with you) and then click Install.
- All components will be installed EXCEPT for the final configuration piece necessary to make things work.
- Next, we need to run the Web Server Configuration utility. If MAMP is running, you may have problems with this step. Make sure MAMP is not running. The WSConfig utility can be found at /Applications/ColdFusion10/cfusion/runtime/bin/wsconfig. Just double click that file to run it. The WSConfig utility looks very similar to the step earlier where we pick the server and binaries for Apache. With that in mind, here’s how to configure it:
- AppServer Host: localhost
- Web Server: Apache
- Configuration directory: click the … button and browse to /Users/username/Library/Application Support/appsolute/. Click on, but don’t open the MAMP PRO directory, and then click Select. If you click into the MAMP PRO directory, it will choose the wrong path for you.
- Click the Advanced… Button.
- Leave the other advanced settings alone and click OK.
- Click OK to close the Add Web Server Configuration window. You will receive a confirmation window asking to attempt to restart the web server. Click No.
- The WSConfig utility will attempt to add the requisite bits to the httpd.conf file located at /Users/username/Library/Application Support/appsolute/MAMP Pro/. It will also add a file to the MAMP PRO directory called mod_jk.conf. In httpd.conf, it will make a number of changes to add support for ColdFusion. In my httpd.conf file I found a line at the bottom:
# DONT REMOVE: MAMP PRO httpd.conf template compatibility version: 10
Include "/Users/blang/Library/Application Support/appsolute/MAMP PRO/mod_jk.conf"
This nicely encapsulates all the CF configuration into one external .conf file.
I also found this section had been modified:
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
DirectoryIndex index.cfm index.html index.php
- You should now be able to close out of the WSConfig utility, close any Terminal window that was opened when you ran the utility, and go back and restart MAMP Pro.
- UPDATE:Make sure to edit your httpd.conf file in MAMP Pro. For some reason, changes to that file in other text editors get overwritten by MAMP Pro. You need to have the changes detailed just above for MAMP Pro to work properly with ColdFusion.
Did it work? It did for me. I was able to browse to http://127.0.0.1/CFIDE/administrator/index.cfm or http://localhost/CFIDE/administrator/index.cfm to finish the ColdFusion configuration – CF performs a first-run cleanup/setup step the first time you visit the ColdFusion Administrator page. Once that is done, you can log into the CF Administrator using the credentials you created during install, and configure the server to your heart’s content. You can also use MAMP Pro to configure as many websites as you want to run on your developer machine.
I hope this helps someone out there… the first time I ran through this process with CF9 and MAMP Pro, it took a lot of trial and error (mostly error) to get it working.
If you have any questions, post them here, and I’ll try to help. I know what worked for me, but I may not be able to help everyone.