How to Install Tomcat Server on EC2 Instance/Linux Machine ๐๐จ๐ปโ๐ป
\=> Apache Tomcat is a web server โ
\=> Apache Tomcat is used to run Java Web Applications ๐
\=> Apache Tomcat is free & open source ๐
\=> Apache Tomcat runs on 8080 port by default (we can change that port) ๐ฅธ
Installation of Tomcat ๐จ๐ปโ๐ป
1) install java software using below command.
$ sudo su
$ yum install java-1.8.0-devel
2) Verify the version of java installed in our machine.
$ java -version
3) We can download apache tomcat from official website. We can find apache tomcat urls to download using official website downloads page.
$ wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.91/bin/apache-tomcat-9.0.91.tar.gz
4) After tomcat tar file got downloaded then extract Tomcat Tar file using below command.
$ tar -xvf <tomcat-tar-file-name>
5) Go inside the Tomcat folder and see the folder structure.
$ cd <tomcat-folder>
$ ls
6) Go to the Tomcat bin directory and run Tomcat Server.
$ cd bin
$ ./startup.sh
Note: Tomcat Server runs on "8080" port by default. Enable this port in security group as custom tcp.
Type : Custom TCP
Protocol : TCP
Port Range: 8080
Source : Custom (0.0.0.0/0)
7) Access Tomcat server from your browser.
URL : http://EC2-VM-Public-IP:8080/
In This Way , We can install Tomcat Server on Linux Machine โ ๐ฏ
ย