Railo is an open source, and free, CFML (Coldfusion) compiler. Railo translates CFML (Coldfusion Markup Language) into Java classes, which are then executed by a Java server. The default Java server used by the standard Railo installer, is Tomcat.
As of the latest release, Railo is mostly compatible with Coldfusion 9.0.1. You can refer to the Railo web site for details on supported and unsupported tags and functions.
Firstly, obtain the Railo installer. The latest installer can be found here, which you can find the URLs for and use 'wget' to fetch them. Below is an example, using the latest version as of this writing.
32 BIT (I386/I686)
wget http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-installer.run
64 BIT (X86_64)
wget http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-x64-installer.run
Once the installer is downloaded, give it execute permissions.
chmod +x *.run
Then execute the file.
./railo-*-installer.run
The installer will prompt a serious of questions, for which you can use the default values for. However, for the setting 'Tomcat System User', it would be best to set this as the 'apache' user, to ensure .cfm pages are executed the same as Apache, instead of 'root'.
Now restart apache (service httpd restart), and the Railo Administrator should be accessible.
http://<server ip>/railo-context/admin/server.cfm
Add a Site
For a site to load CFML (.cfm, .cfc, etc) pages, the site must be added to the Tomcat server. To do this, open the file /opt/railo/tomcat/conf/web.xml in a text editor scroll to the bottom of the file. There, you'll find a commented out example host.
<!--
<Host name="[ENTER DOMAIN NAME]" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="[ENTER SYSTEM PATH]" / >
</Host>
-->
Copy this example (minutes the comment tags) just below it. Specify the domain name (name=), web root (docBase=), and any aliases (<Alias>). For example, for a site 'domain.com', located under '/var/www/domain.com/html' insert the following under the above example (but above the closing </Engine> tag.
<Host name="domain.com" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/www/domain.com/html" />
<Alias>www.domain.com</Alias>
</Host>
Once the file has been updated, Railo's Tomcat server must be restarted.
/etc/init.d/railo_ctl restart
To test this, we can create and access a test.cfm file on the site with the following content.
Today's Date: <CFOUTPUT>#DateFormat(Now(),"dddd,m/d/yy")#</CFOUTPUT>
Permissions
Because Railo was installed as the apache user, we must be sure that the site's directory and it's contents, are owned (or at the least readable and listable) by the user.
chown -R apache.apache /var/www/domain.com/html