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
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.
Add port in the firewall rule to access from the browser
firewall-cmd –permanent –add-port=7070/tcp
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
Tomcat service is started now, check port is listening or not.
I will show you both tomcat running on the same server with images.
Tomcat 1 running on port 9090
Tomcat 2 running on port 7070
YouTube Link: Run Multiple Tomcat On Same Server
You’re done tomcat deploy multiple applications configure multiple tomcat shell script to start