How To Run Multiple Tomcat Instances On Single Linux Server

How To Run Multiple Tomcat Instances On Single Linux Server

You need to download your tomcat version on the same machine where you want to run multiple tomcat instances on a single Linux server. You can deploy multiple tomcat applications and configure tomcat on the same server and can also use a shell script to start the server. if you get this message ‘tomcat port already in use’, it means that port is already running on another tomcat.

Check Out: Configure Varnish For Apache Web Server

cd /opt
mkdir tomcat8
cp /root/apache-tomcat-9.0.13.tar.gz tomcat8

Now you need to change only port number in this file vim /opt/tomcat8/apache-tomcat-9.0.13/conf/server.xml.

I will be running another tomcat instance on port 7070.

Run Multiple Tomcat Instances

Check Out:  How To Configure Samba Server For File Sharing

Add port in the firewall rule to access from the browser

firewall-cmd --permanent –add-port=7070/tcp
firewall-cmd –reload

multiple tomcat instances linux

Check Out: Configure Role Based User Access In Jenkins Server On Linux

Start the tomcat server  from this locations /opt/tomcat8/apache-tomcat-9.0.13/bin/

./ ps -ef | grep java

Note: In the production environment, first kill the process then start the service. 

ps -ef | grep java

configure multiple tomcat

Check Out: Httpd Could Not Reliably Determine Server’s Fully Qualified Domain Name

Tomcat service is started now, check port is listening or not.

netstat -tnlp

tomcat deploy multiple applications

I will show you both tomcat running on the same server with images.

Tomcat 1 running on port 9090

how to run multiple tomcat

Check Out: Create Apache Docker Image Using Dockerfile In Linux

Tomcat 2 running on port 7070

tomcat port already in use

YouTube Link: Run Multiple Tomcat On Same Server

You’re done tomcat deploy multiple applications configure multiple tomcat shell script to start

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment