Step 1: First connect to AWS ec2 instance through Putty.

To ensure that all of your software packages are up to date, perform
a quick software update on your ec2 instance. This install java as well in your ec2 instance.
[ec2-user ~]$ sudo yum update -y
You may cross verify java installation like below
Step 2: Using below command you can install the Apache web server, MySQL,
and PHP software packages. Use the yum install command to install multiple
software packages and all related dependencies at the same time.
[ec2-user~]$ sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
*You may ignore above steps if you are already done with above steps as these things are given in Amazon documentation itself.
Tomcat 7 Setups :-
Step 3: Install Tomcat 7 using below command
[ec2-user ~]$ sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps
Step 4: After tomcat7 is intalled successfully you need to configure Security Groups of your ec2 instance as below, so that Tomcat default port 8080 is opened and accessible from anywhere.
Step 5: Edit tomcat-users.xml and update admin user-id and password.
[ec2-user ~]$ sudo vi /etc/tomcat7/tomcat-users.xml
How to edit ?
Press "I".
Edit <tomcat users> for manager GUI role with username and password.
Press "Esc" Button
Type :wq

Step 6: Now start Tomcat 7
[ec2-user ~]$ sudo service tomcat7 start
Step 7: Now hit ec2 public url on port 8080, you should see Tomcat Home Page.

Step 8: Optional Steps (recommended)
[ec2-user ~]$ sudo chkconfig tomcat7 on
Java War File Upload And Deployement
Navigate to Manager App.You will be prompted to enter admin user-id and password.
Entering valid credentials which you updated in tomcat-users.xml in Step 5,
you would land to Tomcat Manager Dashboard.
Now, simply browse,upload and deploy your WAR file directly from your desktop.
This comment has been removed by the author.
ReplyDelete