Installing Railo on EC2 with Amazon Linux
After following the comments on Ben’s Blog about running Railo
on EC2
. I decided to post my notes in case they might help someone. This assumes you know how to setup an account and the firewall on Amazon AWS. There is a GUI on the amazon site to do all this. It can be done pretty easily with a little trial and error.
- Setup an EC2 account and launch an Amazon Linux AMI instance with the security settings to have ports :20, 21, 22, 80, 3306,8888 open.
- Once it’s launched ssh to your new instance as ec2-user
- sudo su - ( logs you in as root )
Update AMAZON LINUX
Install MYSQL
This installs mysql just follow the prompts.
This sets mysql to run on the start of the instance. ( edit the server settings in /etc/my.cnf with nano )
This starts MYSQL on your instance for the first time.
This file lets you setup the mysql root password and disable other stuff. The default mysql root password is “blank” so you must run this script.
% lets your user login from anywhere usually this is a bad idea. Set it to your IP address will be connecting remotely from. Localhost setups up the user so your Railo DSN’s can talk to mysql. Change ‘password’ to a secure password you want to use.
Apache
This is similar to how we did mysql. If you navigate to your instance http://[yourinstancename].compute-1.amazonaws.com/
you should get the apache start screen.
Railo
This runs the installer you’ll need the folders below. On the 64bit version the defaults work. Apache is 2.2 for the connector.
Railo will now be running you can get to it by your EC2 name and port 8888 check the server and web admin to make sure the passwords are setup. Configuring a new site on APACHE and RAILO The sites need to be setup in railo and apache we’ll setup a test site so you can see what to do. On you laptop edit your hosts file and add an entry for :
Substitue your EC2 ip for 999.999.999.999
On your EC2 instance :
At the end of the file near the example add:
This will add the webroot to railo.
This will reboot railo to see the new web folder.
Navigate to www.mytestdomain.com and you should be running Railo
. This is just a summary of my notes to get everything running. Obviously your mileage will vary and it will help to know a bit about running Apache
, MySql
, and Railo
.
Good Luck.
Notes and stuff