Skip to content

HMIS Tomcat on Amazon EC2

suryayadavalli edited this page Feb 11, 2015 · 1 revision

Assumptions

  • AWS Account is already in place.
  • Putty or some other SSH utility is installed on your system, to access Amazon EC2 Console

##Steps to Launch AWS instance

Access the AWS Management Console and click the EC2 tab to create a new instance:

  • Choose an AMI in the classic instance wizard: (Basic 64-bit Amazon Linux AMI is recommended).
  • keep the default settings, for your instance. You can alter the settings later as needed for the applications running on this box.
  • Create a new key pair. Enter a name for your key pair (i.e. hmis_access) and download your key pair (i.e. hmis_access.pem).
  • Select the quick start security group or create a new security group for your instance
  • Launch your instance.

SSH to the EC2 Instance

Use that address (and a path to your .pem file) to ssh into hmis EC2 instance: ssh ec2-user@public_dns_of_hmis_ec2_instance -i ~/hmis_access.pem

Install Tomcat

To install tomcat, ssh into your instance and type the following command: sudo yum install tomcat

All The configuration files for tomcat are in /usr/share/tomcat

To start Tomcat: sudo service tomcat start

To stop Tomcat: sudo service tomcat stop

By default Tomcat server uses port 8080. This port need to be opened to be able to access the webapps you installed on the tomcat instance. This can be done by creating a security group and adding the inbound IP address for 8080. If you are front-ending your tomcat by Apache, the inbound IP addresses will be added for the port where Apache is running.

After adding the inbound IPs, you can access tomcat using http://public_dns:tomcat_port/

Clone this wiki locally