Installing Railo 3 on Linux (CentOS): Part 1

In a previous post I alluded to how I learn by doing and generally go about it the "hard way". What I learn while sometimes being frustrating tends to settle in my brain and stay longer than if it was a piece of cake. It also allows me to then share with you what I learned and hopefully make life a little bit easier for you. Not everyone likes to do things the hard way.

I should also note that the most of the instructions I got from a PDF on installing Railo 2 on Linux, the rest came from contact with Railo support and help Viviotech.

Why CentOS

Before answering the why I should also answer the what. CentOS is a Community Enterprise Operating System. It is a Linux distribution and naturally is also free. So why CentOS then? Well honestly I didn't choose CentOS as such. I decided to get a VPS from Viviotech and it came pre-installed.

Before we start

I installed everything as root. I am going to make a couple of assumptions.
  1. Apache is Installed and you will be using Apache as your web server.
  2. typing "make" at the command prompt returns something like
    make: *** No targets specified and no makefile found. Stop.
    , which means that make works.

Installing Railo

We are now ready to install Railo. The first thing you need to do is grab the latest release from the Railo website.
-bash-3.2# cd /opt
-bash-3.2# wget http://railo.ch/down.cfm?item=/railo/remote/download/3.0.0.005/server/unix/railo-3.0.0.005-resin-3.1.2-with-jre-linux.tar.gz
Once Railo is finished downloading you can unpack it using tar.
-bash-3.2# tar -xzf railo*.tar.gz
-bash-3.2# ls
railo-3.0.0.005-resin-3.1.2-with-jre-linux.tar.gz
railo-3.0.0.005-resin-3.1.2-with-jre-linux
-bash-3.2#
Good, now you have it unpacked you can go ahead and delete the archive file.
-bash-3.2# rm railo*.tar.gz
To make things easier you can also create a symbolic link to the Railo directory instead of trying to type in the whole thing.
-bash-3.2# ln -s railo-3.0.0.005-resin-3.1.2-with-jre-linux railo
-bash-3.2# ls
railo
railo-3.0.0.005-resin-3.1.2-with-jre-linux
-bash-3.2#
There are a few files we don't need in this install that are packaged by default so we can go ahead and delete them too.
-bash-3.2# rm -rf httpd.exe install-service.bat remove-service.bat setup.exe win32
You now have Railo installed and all unnecessary files removed you can now test to see if resin actually starts.
-bash-3.2# /opt/railo/bin/httpd.sh start
Resin/3.1.2 started -server ''.
-bash-3.2#
Congratulations Step 1 is complete. Opening a browser and pointing it to http://<ipOfLinuxBox>:8600/ should produce the standard Railo start page.

Conclusion

This may seem like a lot of work in comparison to the single click you need to install Railo on a Windows box, but this is *Nix machine and you have to come prepared to do stuff manually. In the next part we will make (compile) and install mod_caucho, which is an Apache module that allows interaction between Resin and Apache. Without this module you can't use Apache as your web server to serve cfml pages.

14 Comments to "Installing Railo 3 on Linux (CentOS): Part 1"- Add Yours
bill shelton's Gravatar Thanks for the post, Gary! I just did what you described last night - good timing. I ran into some issues with mod_caucho. In short, I couldn't get it to compile. So, I look forward to your work. One issue I noticed is that, contrary to the Railo documentation, there is no precompiled mod_caucho in the current distribution. But, it's also possible I overlooked something.

best,
bill
# Posted By bill shelton | 11/6/08 6:27 PM
Chris's Gravatar I have post on this too: http://www.hockeypfef.net/index.cfm/2008/9/29/Rail.... Sorry for the bad format as I upgraded to the latest BlogCFC and it didn't like coldfish. Working on a solution.
# Posted By Chris | 11/6/08 7:41 PM
# Posted By bill shelton | 11/7/08 9:18 PM
Tony Garcia's Gravatar Thanks for posting these instructions, Gary. I'm trying to follow them to install Railo on my Viviotech VPS (which also has CF8 installed in standalone mode), but I'm very green when it comes to linux. When I try to start resin, I get this message:
/opt/railo/bin/httpd.sh: line 34: exec: java: not found
any ideas?
# Posted By Tony Garcia | 11/10/08 5:00 PM
Gary's Gravatar @Tony,

The CentOS doesn't come with Java installed you need to do it yourself. At the command prompt type

-bash-3.2# yum install java

it will download and install java for you.

Railo comes bundled with the JRE so you should be able to set up your JAVA_HOME to point to it, but I installed the full jdk :)
# Posted By Gary | 11/10/08 6:42 PM
Tony Garcia's Gravatar Thanks Gary,
I did a yum list and it looks like the version of Java in the repo is 1.4.2 (I'm on a Viviotech VPS too). Were you able to get the 1.6 version installed using yum?
# Posted By Tony Garcia | 11/11/08 11:58 PM
Gary's Gravatar I installed the latest version the "hard way" meaning downloaded rpm from sun site :) If i find the instructions again I can email them to you
# Posted By Gary | 11/11/08 12:56 AM
Tony Garcia's Gravatar I would really appreciate that, Gary. The Viviotech guys are great, but they categorize helping with anything outside of a yum install as "premium" (paid) support.
# Posted By Tony Garcia | 11/11/08 1:50 AM
Tony Garcia's Gravatar Gary -- never mind. They Viviotech guys ended up giving me some great instructions and I'm all set!
# Posted By Tony Garcia | 11/11/08 6:36 AM
Tim's Gravatar Hi wondering if you or anyone else has ever run into this problem, I'm trying to install Railo on Red Hat EL5. I have JDK 1.6 installed. Apache 2.2 installed. I follow the directions here but when I got to start resin, I get this error. Any ideas?

[root@localhost railo]# bin/httpd.sh start
conf/resin.conf:5: java.lang.NoSuchMethodError: method java.lang.Class.isAnnotationPresent with signature (Ljava.lang.Class;)Z was not found.

3: -->
4: <resin xmlns="http://caucho.com/ns/resin";
5: xmlns:resin="http://caucho.com/ns/resin/core">;
6:
7: <!-- adds all .jar files under the resin/lib directory -->
# Posted By Tim | 11/26/08 1:09 AM
Paul Kukiel's Gravatar The CentOS guide is quite good but I'm used to Debian but its very similar and I had almost no differences except I get to use apt. I'm actually working on a similar script for Debian. Thaks Gary
# Posted By Paul Kukiel | 12/5/08 7:54 PM
zanna's Gravatar Thanks for its instructions. I was install Railo 2. And now I want change old version on new , but I can not download its. Please upload Railo 3 on someone fileshare like this http://rapidpedia.com .
Thanks
# Posted By zanna | 1/23/09 4:00 PM
Ryan's Gravatar Gary,
Any experience getting this going with httpd 64 bit on Centos?
# Posted By Ryan | 4/5/09 8:23 AM
Gary Gilbert's Gravatar @Ryan,

Sorry I haven't yet tried with the 64bit Apache. I've seen a bit of traffic on the railo google groups about 64 bit versions. I will let you know if I see something there, if not then I will give it a try this week myself.
# Posted By Gary Gilbert | 4/5/09 8:55 AM

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 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