How To Install Apache Tomcat 8 on Ubuntu 14.04

r00t February 26, 2015

Apache-Tomcat

For those of you who didn’t know, Apache Tomcat is an open source web server and servlet container developed by the Apache Software Foundation. It implements the Java Servlet, JavaServer Pages (JSP), Java Unified Expression Language and Java WebSocket specifications from Sun Microsystems and provides a web server environment for Java code to run in.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation apache tomcat 8 on ubuntu 14.04.

Step 1. JAVA is the first requirement of Tomcat installation.

Add the repository:

Update apt and install Java 8:

You can also verify it, by issuing the following command.

Step 2. Download and extract Tomcat packages.

After installing and configuring JAVA on the system, now it’s time to download latest version of Apache Tomcat.

Add tomcat user and group:

Step 3. Configure environment variables.

Before starting Tomcat, configure CATALINA_HOME environment variable in your system using following commands.

Step 4. Configure Tomcat to run as a service.

You will get the following output.

You can verify the service running, by default tomcat runs on port no 8080.

Step 5. Finally, open Tomcat from your browser, go to your IP or domain with the 8080 port (because Tomcat will always run on the 8080 port) as an example: mydomain.com:8080, replace mydomain.com with your IP or domain.

To shutdown Tomcat you can simply run the shutdown script in the same folder like this:

Step 6. Setup user accounts.

Configure Tomcat users so they can access admin/manager sections. You can do this by adding the users in the conf/tomcat-users.xml file with your favorite text editor. Add this text to the file:

Place the following two lines just above the last line.

Congratulation’s! You have successfully installed Apache Tomcat 8. Thanks for using this tutorial for installting apache tomcat 8 on ubuntu 14.04 systems.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!
Share on Google+3Share on Facebook4Tweet about this on TwitterShare on Tumblr1Share on StumbleUpon1Share on Reddit1Pin on Pinterest1
The Tags:

Leave a Comment