Install Apache Tomcat using EasyApache4

Posted on July 2nd, 2019

The Apache Tomcat is an Apache module that provides a web server in addition to the Apache web server for the Java Servlet, Java Server Pages, Java Expression Language, and Java Web Socket technologies. In cPanel/WHM version 76, they implemented a new version of Apache Tomcat for EasyApache4. Tomcat is supported in WHM version 76 and later.

Please note that Tomcat can present security issues with multiple users, so you must know the risk of the feature you are going to use. Please refer the following KB to more about tomcat security.

In this tutorial, we will show how to install and configure Tomcat. First, you will need to install the experimental repository on the server.

Install Experimental Repository

yum install ea4-experimental

For more about experimental repo, refer this document

Install Apache Tomcat via WHM Interface

This is the method you would like to use if you don’t want to mess with Linux commands.

1) Login to WHM as a root user.

2) Go to WHM >> Software >> EasyApache 4 >> Additional Packages.

3) From there, click on the “Install” button next to the Tomcat.

Install Apache Tomcat via Command Line

You can also install Tomcat via command line on your server. Follow the below-given steps to install Tomecat via command line.

1) Login to the server through SSH as a root user.

2) Run the following command to install Tomcat.

yum install ea-tomcat85

3) To uninstall Tomcat, run the following command.

yum remove ea-tomcat85


Configure Tomcat

Tomcat runs as a per-user private instance in EasyApache4. The default location of the configuration file is /home/user/ea-tomcat85/conf 

Add Tomcat Support for Users.

In EasyApache 4, Tomcat runs as a per-user private instance and allows the user to configure their instance themselves.

There is a script to add a user in Tomcat

To add Tomcat support to a user, run the following command.

/usr/local/cpanel/scripts/ea-tomcat85 add username

Here is the sample output.

Adding example’s tomcat 8.5 instance …

Installing dirs…

Installing service…

Installing ubic.watchdog service…

Installing ubic.update service…

Installing cron jobs…

Installing /home/example/.ubic.cfg…

Starting ubic.watchdog…

Starting ubic.watchdog… started (pid 17719)

Installation complete.

Installed “ea-tomcat85” service.

Starting ea-tomcat85… started

… done!

To remove Tomcat support to a user, run the following command.

/usr/local/cpanel/scripts/ea-tomcat85 rem username


Default Configuration.

EasyApache4 makes the following configuration changes from the default Tomcat 8.5 behavior to the /home/user/ea-tomcat85/conf/server.xml file

1) Disable the shutdown port by default.

2) Set the “xpoweredBy” attribute of all connectors to a false value.

3) Add the “ErrorReportValue” class to all Hosts with the “showServerInfo” value set to a false value.

3) Set the following Host attributes to a false value:





You can also set the directives on your own. So, this is how you can install Tomecat with EasyApache4 on your CentOS server with WHM. We hope you liked the tutorial. If you want us to help you with any step, please use the comment section given below.

4 Responses to “Install Apache Tomcat using EasyApache4”

  1. Thabo says:

    Good day. I was able to install tomcat with on my CentOS server. However I am now battling to deploy my spring boot application .war file. I dont know where to put the file and which link to use to access it online from the browser.

    May you please assist.

    • Deepa m says:

      Thabo,I am too in the same track able to host by ip:880/warname but domainname is not working..

  2. Khalid says:

    Where i can find host-manager after do thats commands ??

  3. Aziz says:

    Hi, how can I configure SSL after install

Leave a Reply