Learning the hard way

I'm a big proponent of learning by doing and that is primarily how I learn new things myself. It's like that old saying goes "Give a man a fish and you feed him for a day. Teach a man to fish and feed him for a lifetime." And with that in mind I decided to finally, and entirely way late in my career, get a Linux machine from viviotech.

CentOS

Now I'm not a complete Linux greenhorn, but I am definitely a CentOS virgin, so was surprised to find out that Java doesn't come installed on the OS by default. A little searching later introduced me to something called yum. Now I imagine "yum" stands for something in the CentOS world besides expressing something tasty, but for the life of me I haven't found what, nor have a looked too closely either.

Installing Java on CentOS

As I soon discovered installing Java is a piece of cake and consists of the following.

$ yum install java

That was of course after I first did it the hard way.

So why exactly did I want java on the machine in the first place? Well the goal here is to set up my very own Railo server. Yes I know that you can get a distro of Railo that comes with its own JRE.

so with java installed I proceeded with getting and installing Railo

Installing Railo on CentOS

I found a rather old install guide for installing Railo on a Linux machine and figured that it couldn't be that much difference between the install instructions for one Linux distro and another so I downloaded Railo using wget and followed the directions in unpacking it.

Since I wanted to also use Apache I also need to have the mod_caucho module which you need to build and compile for your specific Linux distribution, the document spoke of a precompiled version. I pinged Gert Franz and in about 15 minutes I had an email from Joachim Koenig with instructions on how to build and compile my very own mod_caucho module.

I compiled and installed the module, edited the hpttpd.conf file for Apache and added the bit that tells hands off the work from Apache to Resin and then started Resin up and Voila. A dsnless preview of an index.cfm page worked.

A little Problem however

So I learned a bit more about Linux, and got a little more comfortable again with typing in commands in the console window so that's a good thing. I got a neat little regular expression from the Railo Blog to set up Resin for dynamic Virtual Hosts. The only problem of course is the www.garyrgilbert.com and garyrgilbert.com are, with this particular regexp, two separate virtual hosts. I tried a number of different regular expressions without luck, and finally decided to do a rewrite rule in my .conf file to automatically send garyrgilbert.com to www.garyrgilbert.com.

The bigger issue comes when adding domains using the lxadmin console, I have yet to figure out how I am going to "automagically" add my virtual hosts in the resin.conf file because I really don't think that regular expression is going to do the trick. Until I figure something out I guess I am going to have to do it by hand, or do it the hard way.

Happy Coding...

6 Comments to "Learning the hard way"- Add Yours
Chris's Gravatar FYI... yum is the "Yellowdog Updater, Modified". See http://en.wikipedia.org/wiki/Yellow_dog_Updater,_M... ;-)

Hmmm... maybe you should attend our training day after ColdFusion Camp 2008. ;-) We will offer 4 trainings, one of which will be on Railo. More information can be found at http://www.cfug.de
# Posted By Chris | 10/30/08 5:18 PM
Tony Garcia's Gravatar Hi Gary,
So did you get a Viviotech dedicated account or a VPS? I'm asking because I have a VPS with them with CF8 installed in 'standalone' mode but I'm seriously considering switching over to Railo. So I'm trying to figure out if the best way to do that would be to have CF uninstalled (along with the integrated JRun) and install Railo/Resin "from scratch."
# Posted By Tony Garcia | 10/30/08 6:01 PM
Gary's Gravatar @Tony
I have a VPS with them.

If you have CF installed in standalone mode it "shouldn't" interfere with Railo at all, both of them operate on different ports. You will of course have to compile the mod_caucho like I did, but in the end it was a good learning experience :)

@Chris...
...Angeber...
Ich möchte schon teilnehmen, muss nur mein Chef überreden...für nur 35 Euros es lohnt sich allerdings!
# Posted By Gary | 10/30/08 6:16 PM
Michael Sharman's Gravatar Perfect timing Gary as I too are considering a VPS to run Railo!

I for one would love it if you could continue this series on Railo including the build process for mod_caucho

Thanks again
# Posted By Michael Sharman | 10/30/08 6:23 AM
Gary's Gravatar @Michael,

Thanks for the encouragement, I will post a series on my experience setting up a Railo VPS.
# Posted By Gary | 10/31/08 1:13 PM
Bob's Gravatar Gary,

Your timing was incredible. The same day you posted this blog entry was the exact day I started to look at Railo for my Centos installation. So I look forward to you continuing this series.

I'm wondering--why did you choose to not use the Railo JRE? Only because you discovered it too late? Or is there some other advantage?

Thanks
# Posted By Bob | 11/1/08 8:30 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