CF8 + MAMP on OSX step by step

Jul 21, 2008

<p>Someone left a comment after my last cry for help about installing CF8 + apache on Mac, so I thought I'd quickly run through the steps I took.

Assuming you're on the latest version of OSX, you *could* use the inbuilt Apache server. However, I've used MAMP, which is essentially a bundled version of Apache, MySQL, PHP.

1) Uninstall CF8 - If you've got it installed already (it's just going to make this easier)

2) Download MAMP from here

3) Download the 32bit (not 64bit, as, although MacOSx is a 64bit OS, the connector on MAMP is 32bit) version of CF8 from adobe.com

4) Install MAMP in the usual way - don't worry about CF yet - just get Apache + PHP working. NOTE - you only need MAMP, NOT MAMP pro. When configuring, set the apache + mySQL ports to their defaults. It should be now reading the files out of /applications/MAMP/htdocs when you go to http://localhost. If you don't get the MAMP start screen, check that a) both the lights in the MAMP Application window are green, and then you've got web sharing turned OFF in Settings/Sharing in OSX

5) So we'll assume you've got the MAMP start page working. If you've got a different place for your installed websites (personally I've got a whole drive which I use as my 'www' root) change it now in the MAMP config. As directory browsing appears to be enabled by default in MAMP, you should be able to see the folders/files in whatever directory you point it to when you go to localhost.

6) Now for CF. Install CF with the following - Single Server Instance, and use the built in webserver (we're not actually going to be using that for now, but I could never actually get the correct config in the installer to get it work on install)

7) Now open the ColdFusion Web Service Connector: You should be able to find this in Applications/ColdFusion (I'm actually writing this on a PC, so can't check the location, sorry).

8) On the window which opens, click "Add" to add a configuration. Use the following settings:

jrun Host: localhost
jrun Server: ColdFusion
Web Server: Apache
Configuration Directory: /Applications/MAMP/conf/apache
Configure web server for ColdFusion 8 Applications: ticked

And this is the important bit, in Advanced:

Enable verbose logging for connector: unticked
Enable native OS memory allocator: unticked
Build Apache module from source using APache eXtenSion tool: unticked
Directory and file name of server binary: /Applications/MAMP/bin/apache2/bin/httpd
Directory and file name of server control script: /Applications/MAMP/bin/apache2/bin/apachectl

Now, CF *should* have done a couple of things. One is rewrite your httpd.conf file to include CF settings, such as .cfm files, and the second is turned on Web sharing under your OSX settings - you need to go back and turn OFF web sharing - the reason is, that is the inbuilt OSX apache server, and not the MAMP one. It gets a little confusing if you don't do that, as you'll see an Apache notice, but it won't be running CF!

I then restart MAMP (if you've set the ports to defaults, it will require your password everytime, as if your port number is lower than 1000 it's sort of quasi protected as a service on OSX).

You should now be able to go to localhost/CFIDE/administrator where it should run the migration script. You'll then be good to go.

I'll double check and add the proper file locations another time when I'm on my Mac.

Comments

Andy Matthews

Andy Matthews wrote on 07/21/08 4:31 PM

Here's a video of Matthew Wallace installing CF8 and MAMP on Leopard:
http://flashalisious.com/2007/12/14/installing-coldfusion8-on-leopard-using-mamp/
Tom K

Tom K wrote on 07/21/08 4:53 PM

Ah yes, forgotten about that - when I tried it step by step from the vid, I was using the 64bit version (!doh!) so I mentally shut it out...
Jai

Jai wrote on 01/10/09 5:40 PM

Hi, I have followed through your instructions to check my CF8 configuration with MAMP + savaCMS - and cannot find how to get round the problem that instead of letting me into CF administrator, localhost only displays the directory index and downloads individual files... Something wrong with my Apache settings?

Please can you help?

P.S.: I had already installed CF 8 long ago, and did not re-install (despite your tip) because I had already got CF 8 set up with Flex etc. - and I'm on a G4 so my CF 8 was already 32 bit.
Tom K

Tom K wrote on 01/10/09 7:42 PM

Sounds like your Apache httpd.conf file hasn't been correctly configured to run CF?
You should see a list of file types in your apache conf file - does it include .cfm ?
Doron Katz

Doron Katz wrote on 03/24/09 11:23 PM

Hi mate, I also cant seem to get cfm to run properly (wants to download it) and yes the httpd.conf has DirectoryIndex index.cfm default.cfm index.html index.php. Ive restarted CF and MAMP and it still does that. it actually pauses for a long time when i first access CFIDE.
Tom K

Tom K wrote on 03/24/09 11:37 PM

Again, not on my Mac at the moment - actually haven't touched the config since I wrote this post!
You should get some idea about what's going on by having a flick through the apache &amp; CF logs;

It sounds a bit like it's searching for the CF dlls, then giving up - i.e the webserver connector hasn't kicked in properly?

What do the logs say?
Doron Katz

Doron Katz wrote on 03/24/09 11:43 PM

Not on a mac haha, gosh poor you.

Well, as far as the web connector, i was going to say, i cant seem to get it to work with your localhost setting, it says &quot;could not connect to any jrun/coldfusion servers on localhost&quot;. But when i put 127.0.0.1 it lets me fill out that form but its using the default apache which is not what we want

Looking at the logs dont seem to show anything with that web connector error.
Tom K

Tom K wrote on 03/24/09 11:47 PM

The default apache should *not* be running!
Turn it off under settings � sharing!
Doron Katz

Doron Katz wrote on 03/24/09 11:52 PM

Fair enough but even with that disabled, it still doesnt let me enter localhost in web connector. Ive uninstalled and just reinstalled CF again following your notes.
Leigh

Leigh wrote on 09/27/09 8:53 AM

Great work. CF8 Administrator fired up after a MAMP restart on Snow Leopard. Thanks for the instructions.
Ryano

Ryano wrote on 10/02/09 5:22 AM

Have tried this about 3 times now. In all instances Apache refuses to start after I run the connector utility. If I comment out the line:

LoadModule jrun_module /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun20.so

in httpd.conf it starts up, but then of course CF isn't connected. I'm definitely using the 32 bit version of CF and 'mod_jrun20.so' does exist. The apache error log reads &quot;caught SIGTERM, shutting down&quot;.

Any ideas?
Tom K

Tom K wrote on 10/02/09 11:43 AM

Well, the SIGTERM is a signal sent by somebody/something to shut down apache; So it sounds like - as you're already deduced - MAMP/Apache doesn't like the config and is killing the startup process.

I must confess, it's been a while since I had to do this (indeed over a year!), and since then, there's been a couple of CF hotfixes, a Java update and an OS update for OSX, so unfortunately it may be a number of issues. May be worth asking on houseoffusion cf mailing list?
Ryano

Ryano wrote on 10/02/09 11:49 AM

oops, just realised how old this post was :)

I got to the bottom of it. I had originally installed 64bit CF before I realised I needed 32bit. Even though I had uninstalled it, parts of it must have been left around because the 'mod_jrun20.so' file was the 64bit version. I could see this when I ran 'file mod_jrun20.so' from the commandline.

I unzipped the WSCONFIG.jar file and found the 32 bit version of the connector. Replaced it and all is good now.

Thanks
Dave

Dave wrote on 10/02/09 10:13 PM

Thank you Ryano! I think I've learned a valuable lesson about installing a wrong version - say a 64-bit version on a 32-bit system. Replacing the mod_jrun20.so file solved my problems launching Apache.

Thanks again!

Write your comment



(it will not be displayed)





About Tom

Tom is the author of this blog and the brains behind OxAlto Design More ...

Categories

Monthly Archives

Links

Tag Cloud

coldfusion web-development internet misc music cfwheels railo drupal vps chchchoir blueprintcss jquery mangoblog flex ipod mac wowza demos flash flickr google hinkseystudio itunesu wallpapers wordpress

Feeds