Cloud Service >> Knowledgebase >> cPanel >> Steps to Install and Configure ea-Tomcat85
submit query

Cut Hosting Costs! Submit Query Today!

Steps to Install and Configure ea-Tomcat85

ea-Tomcat85 is a version of the Apache Tomcat web server specifically optimized for use with cPanel & WHM. It ensures compatibility and streamlined management for hosting environments. Installing and configuring ea-Tomcat85 involves several detailed steps. 

Prerequisites

Before you begin, ensure the following conditions are met:

First, you should have cPanel & WHM installed on your server.

 

Your server should be running a compatible operating system, typically a version of 

CentOS

CloudLinux

AlmaLinux is supported by cPanel.

Step 1: Install EasyApache 4

EasyApache 4 (EA4) is a software provisioning system developed for cPanel that lets the user easily update and manage: 

Apache, 

PHP, 

Other components of the web server.

Login to your WHM interface.

 

On the left side, type in “EasyApache 4” in the search field. Select it

 

If you already have software, you can modify your profile. Otherwise, click the next button to download and install it.

 

In the EasyApache 4 interface, look for the option to customize your profile. Here, you can add additional packages. Search for "ea-tomcat85" and add it to your profile.

 

After adding ea-Tomcat85, review the changes and click "Provision" to install it.

Step 2: Verify Installation

Once the provisioning process is complete, verify the installation of ea-Tomcat85.

Open a terminal or SSH into your server and run:

rpm -qa | grep ea-tomcat85

This command should list the installed packages related to ea-Tomcat85, confirming its installation.

Step 3: Basic Configuration of Tomcat

After installation, you must perform some basic configurations to get Tomcat running.

The Tomcat configuration files are located in /opt/cpanel/ea-tomcat85/conf/. The primary configuration file is server.xml.

Open server.xml with a text editor:

nano /opt/cpanel/ea-tomcat85/conf/server.xml

You can configure the port numbers, server parameters, and other settings in this file.

Step 4: Start and Enable Tomcat

After configuring Tomcat, start the service and enable it to start on boot.

Use the systemctl command to start Tomcat.

systemctl start ea-tomcat85

Enable the service to start on boot.

systemctl enable ea-tomcat85

Step 5: Deploy a Web Application

To test if Tomcat is working correctly, deploy a simple web application.

The default directory for web applications is /opt/cpanel/ea-tomcat85/webapps/.

 

Copy your WAR file into the webapps directory.

cp /path/to/yourapp.war /opt/cpanel/ea-tomcat85/webapps/

Tomcat will automatically deploy the WAR file.

 

You can check the deployment by visiting http://yourserverip:8080/yourapp.

Step 6: Configure Tomcat Users

To manage Tomcat through the web interface, configure users with appropriate roles.

 

Open tomcat-users.xml located in the conf directory.

nano /opt/cpanel/ea-tomcat85/conf/tomcat-users.xml

 

Add user entries with roles. For example:

Step 7: Configure Security Settings

Securing your Tomcat installation is critical for production environments.

Limit access to the manager and host-manager applications by IP address or authentication.

 

Optimize Tomcat Performance

 

For optimal performance, tweak Tomcat's memory and thread settings.

 

Edit the catalina.sh script to set Java options.

nano /opt/cpanel/ea-tomcat85/bin/catalina.sh

Add or modify the following lines to set memory options:

JAVA_OPTS="-Xms512M -Xmx1024M"

In server.xml, adjust the thread pool settings for the connector.

           connectionTimeout="20000" 

           redirectPort="8443" 

           maxThreads="200" 

           minSpareThreads="25" 

           maxSpareThreads="75"/>

Step 9: Monitor and Maintain Tomcat

Regular monitoring and maintenance ensure your Tomcat server runs smoothly.

Check /opt/cpanel/ea-tomcat85/logs/ directory containing log files at least once per day.

Other tools can be used to monitor the health and performance of your Tomcat instance, including 

Nagios

Zabbix.

Update Tomcat by frequently visiting the EasyApache 4 for updates and installing them occasionally.

To Sum it Up!

Installing and configuring ea-Tomcat85 on a cPanel & WHM server involves several steps. Each step is crucial for ensuring a stable and secure environment. Regular monitoring and maintenance further enhance the reliability and performance of your Tomcat server. Following this guide, you can efficiently set up and manage ea-Tomcat85 to meet your web hosting needs.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!