Install and Configure Apache Tomcat
Configuring the apache tomcat server on the amazon linux.
- Download the Apache Tomcat.
https://tomcat.apache.org/download-10.cgi

2. Extract the tar file.


3. Role to manage tomcat server.
It would be quite unsafe to ship Tomcat with default settings that allowed anyone on the Internet to execute the Manager application on your server. Therefore, the Manager application is shipped with the requirement that anyone who attempts to use it must authenticate themselves, using a username and password that have one of manager-xxx roles associated with them (the role name depends on what functionality is required). Further, there is no username in the default users file ($CATALINA_BASE/conf/tomcat-users.xml
) that is assigned to those roles. Therefore, access to the Manager application is completely disabled by default.
You can find the role names in the web.xml
file of the Manager web application. The available roles are:
- manager-gui — Access to the HTML interface.
- manager-status — Access to the “Server Status” page only.
- manager-script — Access to the tools-friendly plain text interface and to the “Server Status” page.
- manager-jmx — Access to JMX proxy interface and to the “Server Status” page
We will configure tomcat server with three roles in tomcat-users. xml which is the default user database for container-managed authentication in Tomcat.
The manager-gui for the manager user and the manager-script for jenkins user to push the code to the tomcat.

4. Install the java.
yum install java
5. Start the tomcat server
#Inside the bin directory of tomcat
./catalina.sh start
#To view the logs
tail ../logs/catalina.out

6. Check out the tomcat server page.
public_ip_instance:8080 (default port of tomcat)
