Knowledge Base

How to install Apache Tomcat using the A2 QuickInstaller

This article describes how to use the A2 QuickInstaller to install the Apache Tomcat web server.

The A2 QuickInstaller is no longer supported, and is only available on older VPS hosting packages. On newer VPS hosting packages, you can use Webuzo to quickly and easily install a wide range of applications and manage your server.

To check if the A2 QuickInstaller supports this application for your Linux distribution, please see this article.

Installing Apache Tomcat

To install Apache Tomcat, follow these steps:

  1. Use SSH to log in to your system as the root user.
    To use the A2 QuickInstaller, you must log in as the root user using SSH. You cannot use the serial console in the VPS Control Panel to run the A2 QuickInstaller.
  2. To start the A2 QuickInstaller, type the following command, and then press ENTER:
    sh /usr/sbin/quickinstaller.sh
  3. Under Application Installers, type the option number for Web/Application Servers, and then press ENTER.
  4. On the Web/Application Server Menu, type the option number for Tomcat, and then press ENTER. The A2 QuickInstaller updates your system, and then begins the installation process.
    The installation process takes some time to complete. Do not interrupt the installation process.
  5. When installation is complete, the A2 QuickInstaller displays the directory path for your web site files, how to start and stop the web server, and other server configuration information.

Testing and configuring the Apache Tomcat installation

To test and configure the Tomcat installation on your system, follow these steps:

  1. Apache Tomcat runs on port 8080 by default. To test the web server, use your web browser to visit the following URL, where xxx.xxx.xxx.xxx represents your system's IP address:
    http://xxx.xxx.xxx.xxx:8080
    The default Apache Tomcat web page appears.
  2. To access the Tomcat Web Manager Application, you must add a user who has the manager-gui role. To do this, modify the tomcat-users.xml file. For example, copy the following code and paste it into the tomcat-users.xml file, changing the username and password fields:
    <user username="username" password="password" roles="manager-gui"/>
  3. After you add a user with the manager-gui role to the tomcat-users.xml file, you must restart Tomcat for the changes to take effect. To do this, type the commands to stop and start the web server that the A2 QuickInstaller provided at the end of the installation process. After you restart the web server, you can access the Tomcat Web Manager Application.

More Information

For more information about Apache Tomcat, please visit http://tomcat.apache.org.