The Apache Software Foundation, also known as ASF recently released Apache Tomcat server 9 on December 8, 2016. Tomcat server implements Java servlet and Java servlet technologies like JSP Java WebSocket. Apache Tomcat is an open-source web server and servlet container that is used to serve Java applications.
It is developed by the Apache Software Foundation, written in Java and released under Apache License 2.0.
Tomcat 9 does not require any special kind of hardware it will need a CentOS server, IP Address of your server and root privileges on the server.
Before installing Tomcat we will have to install Java Development Kit (JDK) on our system but it is recommended that you update the system and available packages before installing JDK. Run the following command to update system.
yum -y update
Now once the system is updated install JDK and to do so run following command:
Move all the files that are in the apache-tomcat-9.0.0.M15 directory to the tomcat directory to do so run following command :
mv apache-tomcat-9.0.0.M15/* tomcat/
Now change the proper ownership using the following command:
chown -hR tomcat:tomcat tomcat
We recommend you to run a short testing on Tomcat to make sure that there is no error and it is installed successfully so follow the below-given process.
Run below given command :
Currently, Tomcat is using port number 8080 so check the open port using netstat command as shown:
You can check this using a web browser with http://yourserver_IP:8080 then you'll see the homepage of Apache Tomcat Server but we recommend you to use browser later at final testing because we will run Tomcat with a systemd service file in the final configuration.
Now run following commands :
cd /opt/tomcat/bin/./shutdown.shchown -hR tomcat:tomcat /opt/tomcat/
Creating a systemd Service File
Now you'll need to create a systemd service file to run Apache Tomcat as a tomcat user. Creation of a systemd service file is recommended for easy starting and stopping the service.
Run following command :
Add the content below into nano text editor, you can simply copy/paste this into the file:
Open your web browser and visit server with port number 8080 http://YourserverIPaddress:8080 then you'll see the homepage of Apache Tomcat like shown below:
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/241207610.png" alt=" " />
Click on the Manager app on the top right side of your screen then you'll be asked to username and password for authentication enter your username and password and you will see manager dashboard like this:
You can manage your Java applications using the Tomcat Web Application Manager. It is also used to Start, Stop, Reload, Deploy. You can also diagnostics on your apps using Tomcat Web Application Manager.
Now go to the host manager and here you'll be again asked to enter a username and password so repeat the above procedure and click on login you'll see a virtual host manager dashboard like this:
In this tutorial, we have learned how to install and configure Apache Tomcat 9 server on a CentOS system very easily and we hope that now after this guide you have enough knowledge to work with Tomcat 9.
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...
You may sometimes need to manually adjust the PHP settings on your cPanel server – for example if a site is hitting the PHP memory, or file size upload limit. WHM allows you to quickly change the settings of any PHP version installed on the server when needed, using the...