919 - 926 - 9847

FarCry 5.2 + Railo 3.1.0.16 + Resin + Apache + MySQL + CentOS - Part 2

Right... part 2. We're going to install Railo in this section. It's going to be a much smaller ride than part 1 ;). But first, some knowledge.

I've learned that:

  • I'm not a fan of CentOS. I prefer the debian distros. Why? I've not really ever had a need to play with SELinux, or IPTables. Why does that matter? Both of these things have caused me grief whilst putting this together as both are enabled by default in both the _64 and i386 builds of 5.3.
  • You must turn off IPTables on each boot of the system. I'm sure there's a way to make this automatic, but I really haven't tracked it down yet. Yes, it would not be an issue if I just set it up... surely this will be a blog posting down the line, but I don't require it for now.
  • I had originally done the write up for part 1 with an _64 build. Everything was great until I got to the point where I needed to build mod_caucho. I could not find a way to successfully build that, and it appeared to be an issue with apsx. I didn't really want to spend my entire day chasing down rabit holes, so I switched to the i386 build. It's at this point that I learned that SELinux was preventing Apache from talking to Caucho. Again, not wanting to chase my tail endlessly, I just disabled SELinux for now.
  • Use PUTTY! I can never get copy/paste to play nice between my VM command line screen and windows. So, I'll just minimize the VM and use PUTTY to terminal (over SSH) into virtual box. In this way, you can also keep several screens up at one time.

So, on with the show.

NOTE: you MUST use the .012 version of Railo at this time. I'm hosting the file on my site as I cannot find it on the official getrailo.org site.

  • Disable SELinux!!!! (or fix it) To disable, use:
  • vi /etc/selinux/config
    SELINUX=disabled
    shutdown -r now
  • We're now ready to grab the railo install. I'd advise using the railo server All OS (without JRE).
  • Change to the home directory (really, anywhere you'd like to dump this file) and run the following. You'll notice that we're grabbing .015 .012 of Railo. We'll discuss how to update to more bleeding edge versions (we need .016) in part 3.
  • wget http://www.geodesicgrafx.com/files/railo-3.1.0.012-resin-without-jre.tar.gz
  • Next, we'll unpack the files from the railo archive. We're going to create a symbolic link called railo for easy reference to the current build. This also means we have a really easy way to update in the future... just change the symbolic link to point to a new/different version.
  • cd to /opt
    tar -xvf ~/railo-3.1.0.012-resin-without-jre.tar.gz
    ln -s railo-3.1.0.012-resin-without-jre.tar.gz/ railo
    cd railo
  • Last, we're going to configure railo to work with Apache. I could not get this to complete successfully using the 64 bit version of CentOS... your mileage may vary. When installing JAVA from the RPM download, it places the files (or sym link...) into /usr/java. These paths will only really work on CentOS, fyi. You must run this from within the railo folder. If these commands should fail... well, uh, google is your friend (and so is the railo mailing list). I have the barest working knowledge of how all of this works and can't really offer any help for errors here.
  • ./configure --with-java-home=/usr/java --with-apxs=/usr/sbin/apxs
    make
    make install
  • Start up Railo, and browse to http://<vmware_IP>:8600 to see if Railo/Resin are working. To start Railo, run:
  • /opt/railo/bin/httpd.sh start
  • Restart our Apache server
  • /etc/init.d/httpd restart
  • You should now be able to test http://<vmware_IP>/caucho-status to ensure that Resin is configured correctly and talking to Apache. You will see an OK status for the Configuration Cluster, and Default Virtual Host (this is where I figured out that SELinux was killing me).
  • Browse to http://<vmware_IP>/index.cfm to see the default Railo status page (or at least, that's what we're hoping to see). The file index.cfm is stored in /opt/railo/webapps/ROOT. In the future, this is where we will be placing our FarCry files. Yes, you'd really want to make a new web context for a production server, but this is not a concern for me at this time.
  • If you'd like to start Resin with the box, copy the files from /opt/railo/contrib/init.resin file to /etc/init.d/resin (thanks Gert Franz!) then run.
  • chkconfig --add resin
    chkconfig resin on

Great! We have Resin/Railo/Apache/MySQL and all the base stuff installed and talking nice-nice to each other. I would also suggest you add index.cfm/.cfml as a default document type (I'll add this in part 3) so we don't have to type out the file name in the browser. I'd also expect that we would break the site out to a virtual host directive, but at this point I'm not really all that concerned about doing so. That will likely be addressed in part 5ish when we want to enable friendly URLs.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Phillip R's Gravatar I've just done this exact thing in that last few day. I'll be interested to see if you run into the same issues I had. To be fair, twas only a dump function that I came across with Railo and I always have to manually make a few date fields in MySQL . I was a bit disappointed with the speed of initialising the farcry framework out of the box.
# Posted By Phillip R | 7/10/09 7:34 AM
Matthew Williams's Gravatar I actually ran into a slew of issues about a month back. I worked with Blair (daemonite) a bit, and he and Mat checked in a bunch of changes within about a weeks time frame. For some reason the changes that were in the core trunk haven't migrated to 5.1.6... but I do have a core download that worked great under Ubuntu/Resin/Railo 3.1.0.016 that I'll be uploading tonight.
# Posted By Matthew Williams | 7/10/09 3:24 PM
Ignatius's Gravatar hey, your post truly aids, now i encounter the same problems, and i have no clue on how to solve the issue. luckily i look yahoo and found your post, it helps me get rid of my trouble. thanks once morejust one thing, can i paste your entry on my site? i will add the source and credit to your site.regards! =-=
# Posted By Ignatius | 9/13/11 7:21 AM