December 21, 2024

How to install Apache Tomcat on Linux-Server

Apache Tomcat is an open-source web server similar to httpd server, but tomcat is basically used to host Java applications like (JSP and java servlet). To deploy an application in tomcat, you will first have to create a WAR file and then deploy that WAR file on your tomcat directory named web apps.

Therefore this article will help you to install apache tomcat on any Linux servers

Step-1: Before Installing tomcat, you should have java installed on your server, and the environment variables should also be set.

To Check If java is installed on your server just type the command
# javac
or
# java -version //to check the java version

Step 2: Download the apache tomcat Archive using the following command:-

# cd /opt
# wget https://vexplains.com/apache-tomcat-8.5.23.tar.gz

After Downloading extract the archive in the /opt directory using the following command:-

# tar xzf apache-tomcat-8.5.23.tar.gz

Step 3: Start tomcat server

To start the tomcat server is very simple just run the following command as follows:-

# cd /opt/apache-tomcat-8.5.23

# ./bin/startup.sh


Step 4: Check tomcat on web server

By default, tomcat start on port 8080. To access Tomcat on the web browser just type your server IP followed by the port number.

http://server-ip:8080

Step 5: To stop tomcat server

To Stop tomcat server just run the following command:-

# ./bin/shutdown.sh

Hope all these steps will help you setting up the tomcat server.

Vedant Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh