Another Linux Railo MySQL install guide (no Apache)

This was meant to be a guide about setting up your server with Linux, Railo, Apache, and MySQL but I've dropped Apache. Why? Well its an overhead I don't need. Resin functions perfectly well as a HTTP server and it does all I need. Why add another bit of software to fail? .... simplify :) In the long run I might change but for now I'd rather save the resources.

So ... where did this guide come from considering there are quite a few guides for this setup? Well for one reason or another I just didn't get on with them and by the end something went wrong which was mainly because I am Mac boy more than a Linux guy and sometimes I just missed the points here and there. The aim of my guide is to be clear and simple. So with a fresh Ubuntu install i'm planning on gettingt Railo running via Resin so I can call

I won't lie, to make this post I have "borrowed" from other sources out there which I will try and link to at the end.

Im running Ubuntu 8.10 (Intrepid) without a graphical interface.

Note: If you are doing this on a clean, new server then before you even read on check out documentation about setting up a Ubuntu server. These guides are the best and clearest I've seen online to date and cover everything you need!!!!


On to Railo

  1. On your ubuntu server, open the Terminal and run:
    $ sudo apt-get install build-essential apache2 sun-java6-jdk This will install all the pieces you need for Java and compiling. If there are any problems installing Java then check out
  2. We are going to install Railo into the /opt/ folder. So next we are going to move in to the /opt/ folder and download Railo;$ cd /opt
  3. Go to Get and the Download section. Find the links under Railo Server and copy the link for the ALL OS, tar.gz, and without JRE version. Currently this is
  4. With this link copied go back to the terminal and type $ wget {paste the URL link here with out the brackets}. So with the current URL your terminal syntax will be $ wget
  5. We now have the downloaded Railo server in /opt/ and we're gonna unpack this with the following command $ sudo tar -xf railo- This command will unpack the Railo file you downloaded in to a folder called "railo-".
  6. Don't worry about the long folder name for now as we will create a symbolic link in the next step to make referencing it easier. $ sudo ln -s railo- railo $ sudo chown -R {your username} railo
  7. A quick recap; at this point we have Java, Railo, and Resin installed and we are ready check we've done it right by firing up Railo $ /opt/railo/bin/ now go to http://localhost:8600/ and Railo should be running and a link to the administrator. At the moment the only way to stop this service is with ctrl-c. Later on will start this in the background by adding an argument but before we continue ctrl-c in the terminal to stop Railo/Resin.
  8. This is all well and good, but its not running off port 80 which is what most people, if like me, want. We're going to edit the Resin.conf file now and change the port from 8600 to port 80
  9. Open the Resin.conf file $ sudo nano /opt/railo/conf/resin.conf look for the line <http address="*" port="8600"/>, we're going to change the port to 80
  10. For each site you need edit the Resin configuration file again. Im going to add my sites to the directory /var/www/. So lets create our first site$ mkdir /var/www/mysite
  11. Now edit our Resin.conf file at /opt/railo/conf/resin.conf$ sudo nano /opt/railo/conf/resin.confThen around line 250, just before the following comment <!-- configures the default host, matching any host name --> add a host and host-alias's if you use them: You can find out more about this here. Its even possible to use RegEx in there as well.
  12. Now restart the server $ sudo /opt/railo/bin/ start This time we have passed "start" to the Resin command, this will load it as a service in the background. Then go to and check it all work.


comments powered by Disqus