Installing Railo 3 on Linux (CentOS): Part 2

In my previous post we started installing Railo on the CentOS Linux distribution. As most of us know installing applications on a Linux system sometimes requires more than one step. This installation is just that type.

mod_caucho

In order for your cfml pages to be processed the requests need to be routed from Apache to Caucho Resin, a J2EE open source application server, who then hands off the work to Railo. This isn't a problem under the Windows operating system since they already have a compiled DLL, but with all the different Linux distributions you need to "roll your own" binary.

Compiling mod_caucho

The first thing we need to do is installed the Development Tools for Apache HTTP server or httpd-devel.

-bash-3.2# yum install httpd-devel

After the install is finished change directories into your Railo directory.

-bash-3.2# cd /opt/railo
-bash-3.2# /configure --with-apxs=/usr/sbin/apxs --with-java-home=/railo/jre
<---- a bunch of stuff happens here ---->
-bash-3.2# make
-bash-3.2# make install
<---- some more stuff happens here ---->

Once the above is complete and didn't throw any errors the make and install should have added a LoadModule entry into your Apache httpd.conf file pointing to your newly compiled mod_caucho.so

LoadModule caucho_module /usr/lib/httpd/modules/mod_caucho.so

Virtual Hosts

If you have a control panel on your CentOS box it is most likely that you will have a separate .conf file for every Virtual Host that you create. You "could" add code into each of these .conf files to pass off the control to resin or you could do it in the main httpd.conf file. Since my VPS is a Railo box and most if not all of the Sites I will be hosting will be cfml based I decided to put the resin config in the Httpd.conf file.

# ----- resin START 
 
ResinConfigServer localhost 6802 
SetHandler caucho-request 
CauchoStatus yes 
 
SetHandler caucho-status 
 
 
# ----- resin END 

Congratulations you are Done...Honest!

You should now be good to go. Your server will now be able to process Coldfusion code using the Railo CFML Engine with Resin, Apache on a CentOS Linux distribution.

Related Blog Entries

6 Comments to "Installing Railo 3 on Linux (CentOS): Part 2"- Add Yours
Jon Hall's Gravatar Thanks for these two blog posts, they helped me get my local server up and running on ubuntu.

I will note that you set your parameter --with-java-home=/railo/jre shouldn't that be /opt/railo/jre?

I set mine up with apache2 and I had to also use /usr/bin/apxs2 for the --with-apxs.

Again, thanks for the very useful post!
# Posted By Jon Hall | 11/14/08 6:25 PM
andrea's Gravatar Something weird on my box.
After ./configure calling make I get a command not found massage....it never happened to me before

Andrea
# Posted By andrea | 8/19/09 7:08 AM
Gary's Gravatar Do you have the dev tools installed on your box? if you get a command not found then it could be that make is not installed on your box.
# Posted By Gary | 8/20/09 11:30 PM
steve's Gravatar Hey first off thanks for the great tutorial. For some reason my Apache is *** Stopped ***. And when 'service httpd start' I get a syntax error on line 2 of httpd-php-handler.conf: invalid AddHandler. Any insight would be much appreciated! Thanks.
# Posted By steve | 11/9/09 5:14 AM
Gary's Gravatar @steve,

could you send me your conf file gary[at]garyrgilbert.com
# Posted By Gary | 11/9/09 5:56 AM
sarahsam's Gravatar Well this is very interesting indeed.Would love to read a little more of this. Great post. Thanks for the heads-up…This blog was very informative and knowledgeable http://www.city32.com/category/shopping/classified...
# Posted By sarahsam | 11/18/11 4:25 PM

Powered By Railo

Subscribe

Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.

Tags

adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript jquery max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.

Blogroll

An Architect's View
CFSilence
Rey Bango
TalkingTree

Wish List

My Amazon.com Wish List