Okay, I'm freaking giddy this morning. I was finally able to install and configure Railo 3.0, an open-source CFML engine, on my development machine (Mac OS X 10.5.x).

While I already have Adobe's ColdFusion 8 (CF8) server software installed and configured on my system, I've been wanting to 'switch' to Railo since last year for a few of reasons. First, CF8 is a bit of a resource hog. It consumes between 375 and 600 MB of RAM when running. That's a lot, even with 3 GB of RAM on my machine, because I'm typically running a ton of programs and other server software. Railo, on the other hand, consumes between 200 and 300 MB. Big difference.

Second, Railo is open-source and, thereby, free. My goal, later next month, is to install it on an Aptana Cloud site utilizing it's newly released Java server options (Tomcat is the Java engine they chose) on their cloud. Once installed, I can then run a ColdFusion site on the Cloud!

Third, and this is based more on what I've read than know, Railo is purported to be a far faster engine than CF8. Not sure if that's true but I look forward to running some benchmark tests and such.

Back to the install, I've tried a few times over the past 4-6 months to install and configure Railo to work with my Apache installation. Never got it working right. I could install and run Railo off a port other than the default (80) but, as I've mentioned before, I freaking hate that.

Mercifully, Luis Majano, the creator of ColdBox, which is a kick-ass CFML framework that's taking the CF community by storm (not to oversell it or anything :), wrote up an awesome post on exactly how to get Railo running off Apache in Mac OS X.

One potential gotcha for us Mac folks, Luis uses the default Apache installation that comes with Mac OS X. Nothing wrong with that, of course, but when you get to the commands to make and make install the mod_caucho.so connector, you might have to do some manual tweaks there. Email me if you run into such a problem and I can tell you how I got around it.

Finally, and since I suck at writing Launch Daemons, I altered my Automator application that started the Jaxer server after install to also run an AppleScript I wrote to start Railo as well.

I know this is ├╝ber-geeky but I'm so excited to have Railo running off my standard Apache install. It rocks!

Comments

Craig Kaminsky
Thanks for the heads up on the link. Looks like Luis changed his blog software. You can see the aforementioned post at:
http://www.luismajano.com/category/getrailo/

Scroll down a bit and you'll find the title (the link to the specific post on Luis' new page fails as well but you can read the entry on the category page linked above).
Anonymous
this link doesnt work mate:
http://www.luismajano.com/blog/2008/12/5/Railo-Resin-Apache-and-Mac-OS-X--A-FAST-Combination
Emmet McGovern
I've never been a fan of macports for some reason. I do install MySQL, then apache. This does make me wonder what macports is compiling that I'm not. Care to show your apache config? Here's mine.

'./configure' '--prefix=/usr/local/php5' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--with-zlib' '--with-zlib-dir=/usr' '--with-openssl' '--without-iconv' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-sockets' '--with-mcrypt' '--with-gd' '--with-jpeg-dir=/usr/local/lib' '--with-png-dir=/usr/X11R6' '--with-freetype-dir=/usr/X11R6' '--with-xpm-dir=/usr/X11R6' '--with-mysql=/usr/local/mysql' '--with-pdo-mysql=/usr/local/mysql' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-apxs2=/usr/local/apache2/bin/apxs'
Craig Kaminsky
@emmet: the main two things I did, after ensuring XCode was installed on my Mac, was (1) install macports (http://www.macports.org/install.php) and (2) followed instructions similar to those found here: http://prendreuncafe.com/blog/post/2009/07/17/Installing-php-5.3,-apache2-and-MySQL-5-using-Macports

I think the biggest thing is to make sure you install all the appropriate add-ins for Apache on the first go (i.e., PHP, MySQL, sudo port install php5 +apache2 +debug +pear +sqlite +mysql5). I've never had luck recompiling Apache but, admittedly, have tried to recompile only once.

I found that my most effective and efficient Apache install was after I wrote out everything you want Apache to do (have PHP, connect PHP to MySQL & PostgreSQL DBs, manipulate graphics with the PHP GD library, etc.).

Once I had my list, I installed everything via Macports, database servers first. If you don't care about PHP, I'd just install the DB and then Apache via Macports.

For example, I installed MySQL (sudo port install mysql5 + server) and then PHP and Apache and PHP connectors (sudo port install php5 +apache2 +debug +pear +sqlite +mysql5 +gd).
Emmet McGovern
I'm definitely having issues compiling with a separate Apache install. Can you outline what you did? I've pretty much lost every hair on my head trying to get this to work.

I just don't like using any of the default service locations on the mac. I've been bitten too many times now by OS updates.
Craig Kaminsky
I was going to mention that I was jealous of your new 17" MBP! I desperately want to update mine, which I got in December 2006. That optional 8 GB of RAM is SO enticing :). You're going to love it!!
Jason
Thanks Craig.. yeah new laptop, new OS, new CF engine... definitely a recipe for disaster! lol.. nonetheless I'm making good progress!
Craig Kaminsky
@Jason: well, that was great timing! I literally just logged on to ask if you installed XCode :)! Please feel free to let me know if you run into any snags and enjoy Railo. It's a great CF engine and I hope you like it.
Jason
@Craig, nevermind, I think I figured it out, I had to install Xcode tools, and I was able to run the compiler. Keep up the great work here however!

Cheers

Jason
Craig Kaminsky
@Martin: I hope it's going well and that you're enjoying Railo!

@Jason: I'll post back more in just an hour or two. Sorry. I have to get a Flex bug squashed to post an update to an application I have in beta. More in just a few!
Jason
Hi Craig

I"m going through the setup following Luis's steps, and have run into the "gotcha" that you speak of. I'm installing it in a fresh 17" Unibody mbp with leopard 10.5.6 if that makes any difference.

The console output I get is:

./configure --with-apxs=/usr/sbin/apxs --with-java-home=/System/Library/Frameworks/JavaVM.framework/Home
checking build system type... i386-apple-darwin9.6.2
checking host system type... i386-apple-darwin9.6.2
checking target system type... i386-apple-darwin9.6.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

Do I need to install a C compiler?!?

Thanks in advance!

Jason
Martin
Great Post, I will also switch my dev mac to Railo/Apache soon.