Environment Description:
Operating System: redhet 5.3
JDK version: 1.4.2
Web Container: Tomcat 6.0
Configuration instructions:
1. VI/etc/profile
Add:
########## First tomcat ###########
Catalina_base =/usr/local/tomcat
Catalina_home =/usr/local/tomcat
Tomcat_home =/usr/local/tomcat
Export catalina_base catalina_home tomcat_home
########## First tomcat ############
########## Second Tomcat ##########
Catalina_base2 =/usr/local/tomcat2
Catalina_home2 =/usr/local/tomcat2
Tomcat_home2 =/usr/local/tomcat2
Export catalina_base2 catalina_home2 tomcat_home2
########## Second Tomcat ##########
Save and exit (PS: ESC,: WQ );
2. Source/etc/profile. If the profile information is modified, it must be changed to "Source" to take effect immediately;
3. CD/usr/local/tomcat2/bin, go to the bin directory of the second Tomcat and find Catalina. sh, download it to the local device, and set Catalina. in SH, replace catalina_base and catalina_home in batches with the information corresponding to the second Tomcat you configured in profile, replace catalina_base in profile with catalina_base2, catalina_home with catalina_home2, replace, and upload and replace;
4. Finally, set the server under tomcat2/CONF. XML open modify close port (8005) and start port (8009), and access port, the default is 8080, if the default configuration of the First tomcat is not modified, at startup, the ports are used by the First tomcat. Therefore, when starting the second tomcat, to avoid port conflicts, you can change these ports to ports not 8009, or. In this way, two or more Tomcat servers can be run simultaneously in Linux;
5. Multiple Tomcat instances are pushed accordingly;
6. This is my most efficient practice at this stage, haha. Before I configure it, I google it. I am not the first and certainly not the last person who needs to do this. However, after I browsed those posts, I felt that everything was ambiguous to tell the truth. Some of them looked wrong, according to some possible posts, there was no final success, cup of cake. I decided to try it based on my understanding and learn from each other. Oh, I have succeeded, and the test is effective.