Install Railo on Slicehost Centos 5.2 Part 1
Linux , CentOS , Railo , SliceHost , Apache , Coldfusion Add commentsThere are several articles on how to install Railo on Centos scattered about the web and many of them do a good job catering to those of us with limited *nix experience. The problem I found is that none of them seemed to be complete and/or accurate as new versions of everything have been released recently. I spent this weekend working thorugh all of the kinks and frustrations of learning to use SSH to setup up my server and the different problems that arised follwing these articles. My goal is that by the end of this post you will be able to avoid some of the problems I enoucntered and have a better understanding of what is going on during the installation. So without further ado, let's begin shall we.
Once you have accuired your Slice from Slicehost.com (of course I always accept referral credits, my email is me AT mikebenner DOT com) you will receive an email with your IP and Root password. The very first thing Slicehost recommends is that you change your root password, setup private key based SSH and install iptables. From a security standpoint I agree with all of these things, from a get a server up and running for the first time the installation of iptables and private key SSH interferred and I recommend you do them last. But let's atleast change the root password.
Login into your server using SSH (if you are on Windows you will need to get a SSH client. Many people recommend PuTTY and so will I).ssh root@youripaddress
You will get a funny little message from Slicehost about security and then be prompted for you password. Once logged in, lets change our password.passwd
Now this is where I stop with their initial recommendations (If you want to continue with them here is their article). The first time I did this I followed them and most of it worked, but while using the 'SUDO' command in the shell and not fully understanding iptables, I ran into issues trying to confirm things where properly running. We will be using the root login for everything in this article. At the end we will come back and continue with their recommendations.
One of the cool features of CentOS (and I believe most linux boxes) is YUM. YUM is a software package manager. It is a tool for
installing, updating, and removing packages and their dependencies on
RPM-based systems. It automatically computes dependencies and figures
out what things should occur to install packages. It makes it easier to
maintain groups of machines without having to manually update each one
using RPM. Using YUM lets make sure our current OS is up to date.yum update
Once that has processed we need to install several development tools that will be used later (as scary as it sounds we will be compiling a connector so that Apache and Resin can comunicate and display .cfml files). Another great aspect of YUM is the ability to get them at once from the 'Development Tools' group. Let's do that now.yum groupinstall 'Development Tools'
I also liked using Nano more than Vi and other editors that we recommended, so let's get that also.yum install nano
OK, now that the basics are out of the way and the system is prepped for the software packages we need let get to the good stuff. Going forward we are going to install Apache (our web server), MySQL (our database), JDK 6 Update 13 (Java for the Resin Server), Railo 3.0.2 without the JRE (our CFML engine sitting on top of Resin), and VSFTP (our FTP server). At this point, it is really going to help if you pay attention and go back and read the messages output in the shell. This is where all of the articles I found needed to be updated or combined with others. I will do my best to point out issues I had and why I am using the methods I am as well as link to the articles that helped me.
First let's get Apache running. This was pretty simple and will give you some confidence in the shell. Again, we will use YUM to get and install this for us.yum install httpd mod_ssl
Once installed we have to start it up./etc/init.d/httpd start
You will notice an error about a fully qualified domain name and that it will use 127.0.0.1. Not a big deal but we can fix it.nano /etc/httpd/conf/httpd.conf
That will open and Nano and using ctrl+v you can scroll down and look for:#SeverName www.example.com:80
You will want to uncomment the line by removing the '#' sign and replace the www.example.com:80 with something meaningful. It doesn't have to be a FQDN, your could be as simple as 'test'. Once you have done that hit ctrl+x and 'y' to save your changes. Now lets restart Apache./etc/init.d/httpd reload
You will notice the error message is gone and more importantly if you point your browser at your Slice's IP Address you should see the default Apache page being served up. There is one more step. We must tell the web server to start on reboot. Entering the following line will do that for you./sbin/chkconfig httpd on
Congratulations you have installed the web server from the shell using SSH. Who needs those silly GUIs?
Since this post is getting a little long we are going to stop here. Go get a beer and celebrate your success and I will start right the next step, MySQL.
Material for this post was inspired by my experiences using the articles on CentOS found here. There is some good information there and really started the ball rolling for me.
Apr 1, 2009 at 3:26 PM Mike,
Thanks for the detailed write-up. What is the minimum memory requirements for a Railo installation on slicehost? Is the minimum slice at 250MB enough?
William
Apr 1, 2009 at 3:28 PM Yes, I am running it on the 256MB Slice. Granted I haven't put a large load on it, but it is running really fast and smooth so far.
I am almost finished with the last post, so that should be up by the end of the day.
Apr 1, 2009 at 3:34 PM Thanks, that's nice to know. I was thinking of giving it a go myself. Thanks for all your posts related to this.
Apr 2, 2009 at 1:45 AM I added part 3 which will get your completely up and running. I, also, decided on parts 4 & 5 for sure possibly 6 & 7 if interest is there.
4. VSFTP (FTP server)
5. Coldbox 2.6.3
6. Virtual Hosts
7. Railo 3.1 with JBoss
May 19, 2009 at 12:50 PM +1 vote for part 7 (Railo 3.1 with JBoss)
Jul 24, 2009 at 5:07 AM This is a great tutorial and got me set up with my slice.
I found that my 256 slice was a little slow, so I upgraded it to 512 and it now whizzes with about 6 different railo powered sites on there.
Thanks a lot.
I am thinking of setting up a separate slice for emails.. any intentions of a tutorail about setting up email on centos?