Hi all in this post we are going to see, running multiple tomcat in a machine.
Before start you make sure that java is installed in your machine. Because to workwith tomcat you need java.
If u need any assistance to install java. Please refer post How to install java7 ?
What is apache and tomcat?
Apache-tomcat is a http server (web server).
Apache server is good to process static files like html, css and images.
Apache will process only static files, it wont process java or any backend files.
Tomcat server is good to process java (ie. Backend). Even Tomcat can process static files but when compare to apache, apache is best to load static files.
Difference between apache server and tomcat server?
Difference between webserver and application server?
How to install tomcat?
You can install tomcat in two different ways.
Install throught terminal using sudo apt-get install tomcat ccommand.
eg. Sudo apt-get install tomcat7 manager admin user fonts.
Download tomcate server from apache site and extract the tar.
Please refer post How to install tomcat? If you have any doubt.
In this post we are going to see second method.
How to run multiple tomcat?
Keep three copies of tomcat folder and name it like tomcat1, tomcat2, tomcat3.
Open tomcat1/conf/server.xml .
Give unique port address for connectors shutdown, http connector and Ajp connector of each
Start each tomcats.
Deploy any war file in each web apps folder.
How to deploy web application in to tomcat?
You can do it in two different ways.
Copy war file difectly into tomcat/webapps folder.
Through tomcat manager.
To delpoy throught tomcat you have to set tomcat user name and password.
For reference please refer post How to set tomcat username and password?.
Thats it … open tomcat url with correct http port.