How to enable Tomcat Manager

Tomcat Manager Web application is packaged with the Tomcat server and you can access Tomcat Manager by browsing the URL http://yourserverip:8080/manager.

 

Tomcat Manager allows you the ability to start , stop, reload , deploy and undeploy a Web Application.

 

By default Tomcat Manager access is not configured and you have to setup a admin user to access Tomcat Manager on a newly installed tomcat server.

 

Follow the below steps to configure a admin user to access Tomcat Manager ::

locate the tomcat-users.xml file, under %TOMCAT_FOLDER%/conf/ directory

then open the tomcat-users.xml file in your favorite editor

 

 [email protected][#] vi /usr/local/jakarta/tomcat/conf/tomcat-users.xml

and search for the block

<tomcat-users>
<!--
<user name="tomcat" password="tomcat" roles="tomcat" />

<user name="role1" password="tomcat" roles="role1" />

<user name="both" password="tomcat" roles="tomcat,role1" />
-->
</tomcat-users >

update the above block as

<tomcat-users>
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
<user name="root" password="5kVNpB8h7OSi" roles="admin,manager" />
</tomcat-users>

Finally restart tomcat service for the changes to take effect .

Now you can access the Tomcat Manager by browsing the URL :: http://yourserverip:8080 by using the username as root and password as “5kVNpB8h7OSi” .

Note :: You can change the username and password as per your requirement.

That’s all you are done.