Have an environment variable $CATALINA_HOME point to your
expanded Tomcat application directory, e.g. for Linux (in your
~/.bashrc file): export
CATALINA_HOME=/usr/myapps/tomcat-<version>
In the
CATALINA_HOME/conf/tomcat-users.xml file,
we'll need to create a user with appropriate manager permissions.
Create a new user with the role of manager-script or
give the default "tomcat" user the manager-script role as shown below.
This role allows for deploying web applications using scripting
tools such as the Tomcat Maven Plugin we're using in this
tutorial. Although not necessary for Tomcat deployment, The
manager-gui role gives ability to access the browser-based Tomcat
Manager HTML application, helpful for a quick authentication
check. Depending on your security needs, you may or may not wish
to do this in production.
Information noteWarning: For production it is best to grant manager roles to another
username besides the easy-to-guess default "tomcat" user.
Change the "????" in user password line of tomcat-users
configuration to another appropriate password and
save.
Start Tomcat from a console window: {prompt}%
$CATALINA_HOME/bin/startup.sh
If you granted the user the manager-gui role, confirm that you
can log into the manager webapp at
http://localhost:8080/manager/html using the username and password
of the manager account.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!