Install and Configure Apache Tomcat

Shobhit Singh Pal
3 min readJan 24, 2022

Configuring the apache tomcat server on the amazon linux.

  1. Download the Apache Tomcat.
https://tomcat.apache.org/download-10.cgi

2. Extract the tar file.

extracted the tar file
all the configuration files

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.

roles configure

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
start tomcat server and view logs

6. Check out the tomcat server page.

public_ip_instance:8080 (default port of tomcat)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Shobhit Singh Pal
Shobhit Singh Pal

No responses yet

Write a response