The Wayback Machine - https://web.archive.org/web/20240725052856/https://www.geeksforgeeks.org/how-to-install-apache-tomcat-8-on-linux/
Open In App

How to Install Apache Tomcat 8 on Linux?

Last Updated : 06 Oct, 2021
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report

Apache Tomcat (short for “Tomcat”) is a free and open-source Java Servlet, JavaServer Pages, Java Expression Language, and WebSocket implementation. [two] Tomcat is an HTTP web server that runs Java code in a “pure Java” environment.

Tomcat is developed and maintained by a free group of developers under the Apache Software Foundation’s auspices and is licensed under the Apache License 2.0. In this article, we are going to see how to install Apache Tomcat 8 on Linux systems.

Installing Apache Tomcat 8:

Create a directory named tomcat in the /opt folder:

$ mkdir /opt/tomcat
Installing Apache Tomcat 8:

Create a directory

Change directory to tomcat:

$ cd /opt/tomcat
Installing Apache Tomcat 8:

Change directory to tomcat

Go to the Apache Tomcat 8 Download page by clicking this link. Place your cursor under 8.5.65 Binary Distributions, right-click on the tar file and select the copy link address from the menu that appears (as shown in the picture below). At the time of writing, Tomcat 8 is the most recent edition, but you are free to use whatever version is most current.

Installing Apache Tomcat 8:

Next, use the wget command to download the tar from the URL you copied in the previous stage to the tomcat folder on your server:

$ sudo wget https://apachemirror.wuchna.com/tomcat/tomcat-8/v8.5.65/bin/apache-tomcat-8.5.65.tar.gz

Installing Apache Tomcat 8:

Decompress the file in your tomcat folder after it has finished downloading:

$ tar xvzf apache-tomcat-8.5.65.tar.gz
Installing Apache Tomcat 8:

Decompress the file

Installing Java:

You must first install the Java Development Kit before you can use Tomcat (JDK). Check to see if Java is installed first:

$ apt-get install default-jdk
Installing Apache Tomcat 8:

Installing the Java Development Kit

Now verify java installed properly:

$ java -version
Installing Apache Tomcat 8:

Verify java installed properly

Configure .bashrc File:

Use the following command to set the environment variables in .bashrc: 

$ nano ~/.bashrc

Installing Apache Tomcat 8:

Add the following lines to the file’s end:

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.65

Installing Apache Tomcat 8:

After you’ve saved your changes and exited the .bashrc file, run the following command to make the changes take effect:

$ . ~/.bashrc

Your server should now have Tomcat and Java enabled and configured. Run the following script to start Tomcat:

$ $CATALINA_HOME/bin/startup.sh

In a web browser, go to YourIPAddress:8080 to see if Tomcat is up and running. http://127.0.0.1:8080, for example.

Installing Apache Tomcat 8:


Similar Reads

How to install and configure Apache Tomcat 10 on Godaddy Server?
GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. It’s a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure. Apache Tomcat is a cross-platform HTTP web server that runs Java code in a “pure Java” environment. It
3 min read
How to Install Apache Tomcat on Windows?
Apache Tomcat which is short for “Tomcat” is a free, open-source Java Servlet, Java Expression Language, JavaServer Pages, and WebSocket implementation. Tomcat is an HTTP web server that basically runs Java code in a “pure Java” environment. Here, we will see how to install Tomcat 10 on Windows 10 from Zip Archive. Requirements are Java 8 or above
3 min read
Setup Apache Tomcat Server in IntelliJ IDE for Java J2EE Development Projects
In this article, we will discuss a step-by-step guide to set up Apache Tomcat server in IntelliJ IDE. IntelliJ IDEA is an intelligent, context-aware IDE for working with Java and other JVM languages like Kotlin, Scala, and Groovy on all sorts of applications and other web project development. For this IDE we need to add the server externally so tha
3 min read
How to Install and Configure Apache Subversion(SVN) In Linux?
Apache Subversion (SVN), is a version control system like Git. it is distributed under an open-source license. SVN was created by CollabNet Inc. but now it is developed as a project of the Apache Software Foundation. Downloading and Installing Apache SVN Apache Subversion(SVN) can be easily downloaded and installed with the use of the command-line.
2 min read
How to Install Apache Pig in Linux?
Pig is a high-level platform or tool which is used to process large datasets. It provides a high-level of abstraction for processing over the MapReduce. It provides a high-level scripting language, known as Pig Latin which is used to develop the data analysis codes. In order to install Apache Pig, you must have Hadoop and Java installed on your sys
2 min read
How to Install Apache JMeter on Linux?
In this article, we will see how to install Apache JMeter in Linux. Here we will use Ubuntu which is a Linux distribution based on Debian and composed mostly of free and open-source software. JMeter is developed by Java so it is necessary to have java 8 or higher version on your computer. Checking Java Version: Use java --version or javac --version
2 min read
How to Install Apache CouchDB 2.3.0 in Linux?
Apache CouchDB (CouchDB) is a NoSQL document database that collects and stores data in JSON-formatted documents. CouchDB, unlike relational databases, uses a schema-free data model, making record management simpler across a range of computing devices, mobile phones, and web browsers. CouchDB was first published in 2005, and in 2008, it was designat
2 min read
How to Install and Run Apache Kafka on Windows?
Apache Kafka is an open-source application used for real-time streams for data in huge amount. Apache Kafka is a publish-subscribe messaging system. A messaging system lets you send messages between processes, applications, and servers. Broadly Speaking, Apache Kafka is software where topics can be defined and further processed. Downloading and Ins
2 min read
How to Install Apache OpenOffice on Windows?
Apache OpenOffice is an open-source office suite. It provides free applications for spreadsheets, word processing, presentations, graphics, databases, etc. It was initially released on 1 May 2002 and developed by Sun Microsystems (1999–2009), Oracle Corporation (2010–2011). It is easy to use and available in 121 languages. In OpenOffice, the data i
3 min read
How to Install Apache with PHP-FPM on Ubuntu?
The Apache HTTP Server is a free, open-source, cross-platform web server software. It is developed and maintained by Apache Software Foundation. Apache is the most widely used web server around the world. The vast majority of Apache HTTP server instances run on Linux distribution, but current versions also run on Microsoft Windows, OpenVMS, and a v
4 min read
three90RightbarBannerImg