Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Tomcat in Amazon Web Services EC2

I have created an instance in Amazon web services, and I have connected to the server using putty through ssh.

But I do not know how to install tomcat 8 in amazon ec2. Please help me with this.

like image 790
Gowthamraj Somanathan Avatar asked Oct 29 '14 18:10

Gowthamraj Somanathan


2 Answers

You can use yum tool to install the tomcat8 packer from amazon default repository.

The command is: yum install tomcat8-webapps tomcat8-admin-webapps

like image 150
Tiago P Avatar answered Sep 21 '22 10:09

Tiago P


On Amazon Linux 2 AMI:

  1. List extra packages (you will see tomcat8 versions):

    $ amazon-linux-extras list

  2. Install extra packages:

    $ sudo amazon-linux-extras install tomcat8.5

  3. Start tomcat service:

    $ sudo systemctl start tomcat

  4. Create index file:

    $ cd /usr/share/tomcat/webapps
    $ sudo mkdir ROOT
    $ cd ROOT/
    $ sudo vi index.html #add some HTML content

Next you could view your site at localhost:8080

like image 23
once Avatar answered Sep 21 '22 10:09

once