Apache Tomcat Setup in AWS Cloud
Apache Tomcat Setup in AWS Cloud
=> Apache Tomcat runs on 8080 port bydefault (we can change that port)
temp : Temp files will be created here (we can delete them)
$ java -version
Note: If we have multiple java versions installed then we can switch to particular
version using below command
URL : https://tomcat.apache.org/download-90.cgi
-> We can find apache tomcat urls to download in official website downloads page
-> Copy the URL of tar file and execute below command in linux machine
$ wget <tomact-tar-file-url>
Note: I am using
"https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.63/bin/apache-tomcat-
9.0.63.tar.gz"
-> After tomact tar file got downloaded then extract Tomcat Tar file using below
command
$ cd tomact-folder
$ ls -ltr
$ cd bin
$ ./startup.sh
Note: Tomcat Server runs on 8080 port by default. Enable this port in security
group as custom tcp
URL : http://EC2-VM-Public-IP:8080/
-----------------------------------------------------------------------------------
---------------
=> By default the Host Manager is only accessible from a browser running on the
same machine as Tomcat. If you wish to modify this restriction, you'll need to edit
the Host Manager's context.xml file.
=> In Manager context.xml file, change <Valve> section like below (allow attribute
value changed)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
We can change tomcat server default port in tomact/conf/server.xml file
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-> When we change tomact port number in server.xml file then we have to enable that
port in Security Group which is associated with our EC2 instance.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Steps to display Maven Web Application in Tomcat Server
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
<html>
<body>
<h1><font color='red'>Welcome to Ashok IT..!!<font></h1>
<h2>Learn Here.. Lead Anywhere..!! </h2>
Conclusion
+++++++++++
-> Stop Apache Tomact Server