Tomcat instances

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/

./startup.sh 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

LEAVE A REPLY

Please enter your comment!
Please enter your name here