Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

Installing Railo 3.1 On Mac OS X 10.6 (Snow Leopard)

A Step-By-Step Guide To Install Railo Server 3.1 On Mac OS X 10.6 (Snow Leopard)

This week I went ahead and purchased a Mac Mini to replace my very old Apple G4 server. One of the first things I had to do was to get Railo 3.1 to run on it. You may recall, I already created a nice blog entry called Installing Railo 3.1 On Mac OS X 10.5 (Leopard), to help people get Railo running on Mac OS X 1.5. I really didn't think that installing it on 10.6 (Snow Leopard) would be that difficult, but I was wrong.

First of all, the original source of my guide was based off of another blog entry by Luis Majano. But apparently, his website had changed, and as of this writing, was not even working. I remembered he had a nice entry on enabling 64 bit mode when installing, but without his reference, I was SOL and on my own. But fear not my fellow Railo fans, because I spent a better part of a day figuring it out.

Basic Steps

Step 1

Download Railo Server. The current stable version for me was railo-3.1.2.001-resin-3.1.9-without-jre.zip (45 MB).

Step 2

Follow Steps 1 & 2 on my previous guide. The only change you may want to make, is on the ./configuration. To enable 64 bit, you can supply --enable-64bit like so:

./configure --with-apxs=/usr/sbin/apxs --with-java-home=/System/Library/Frameworks/JavaVM.framework/Home --enable-64bit

Step 3

Before moving on to Step 3, we need to edit the httpd.sh file located in /Applications/railo/bin/. Open this file up and scroll to the bottom. There you will see a line that looks like this:

exec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar $*

For whatever reason, when we provided the configuration script with --with-java-home=/System/Library/Frameworks/JavaVM.framework/Home, the $JAVA_EXE variable was not getting set. We are going to manually supply this location in the script file. To do this comment out the old line (or delete it) and add this:

exec /System/Library/Frameworks/JavaVM.framework/Home/bin/java -jar ${RESIN_HOME}/lib/resin.jar $*

This is assuming that you are using a clean install of 10.6. If you upgraded then you may want to check to make sure that /System/Library/Frameworks/JavaVM.framework/Home exists. You may have /System/Library/Frameworks/JavaVM.framework/Versions/1.5 or something like that. Whatever version of Java you want to use, just supply the path here. Once you make the change, you should be able to manually start Railo by typing the following in Terminal:

/Applications/railo/bin/httpd.sh

If not, then double check to make sure your Java path and version are correct. When you finish updated the file, you should be able to go to your browser and point it to localhost to see if Railo is running:

http://localhost/index.cfm

or

http://127.0.0.1/index.cfm

Step 4

Continue following Steps 3 through Step 5. They all seem to still be working as expected. The only other problem I ran into was setting up the LaunchDaemon to get Railo to automatically launch at system start-up. It seems Apple made some changes to this. No problem, I came across a fix. Make the following changes to the XML as follows (New changes are in bold):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.railo.services</string>
        <key>ProgramArguments</key>
        <array>
            <string>/Applications/railo/bin/httpd.sh</string>
        </array>
        <key>KeepAlive</key>
        <true/>
        <key>Disabled</key>
        <false/>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>

Follow the remaining instructions and restart you computer (or restart Apache) and everything should be working. If not, then let me know below and I'll try to help out if I can.