Follow these steps to deploy successfully:
Some specific operations command is not detailed, directly say useful:
1, in the/usr/local deployment of two Tomcat,tomcat folder renamed to: Tomcat6-1, tomcat6-2
2, modify the Linux profile file path/etc
Add the following in profile:
[Plain] View plaincopyjava_home=/usr/java/jdk1.7.0_45 classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib: $JAVA _ Home/bin export Java_home CLASSPATH # TOMCAT1 catalina_base=/usr/local/tomcat6-1 catalina_home=/usr/local/tomcat6-1 Export Catalina_base catalina_home # TOMCAT2 catalina_2_base=/usr/local/tomcat6-2 catalina_2_home=/usr/local/tomcat 6-2 export catalina_2_base catalina_2_home tomcat_home=/usr/local/tomcat6-1 export Tomcat_home TOMCAT_2_HOME=/us R/local/tomcat6-2 Export Tomcat_2_home
3. Modify the Tomcat configuration file
The tomcat6-1 configuration file remains unchanged;
The tomcat6-2 configuration file is modified as follows:
Modify files under Tomcat6-2/bin: Startup.sh and shutdown.sh (as added), add the following to the file:
[Plain] View plaincopyexport java_home=/usr/java/jdk1.7.0_45 export path= $PATH: $JAVA _home/bin Export classpath=.:$ Java_home/lib/tools.jar: $JAVA _home/lib: $JAVA _home/bin export catalina_home= $CATALINA _2_home export catalina_base=$ Catalina_2_base
Modify the Service.xml file under Tomcat6-2/conf, modify (three places) as follows:
[HTML] View plaincopy<server port= "8005" shutdown= "Shutdown" >
8005 Change to 8006 (other unused ports can also)
==================================================================
[HTML] View plaincopy<connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>
8080 Change to 8081 (other unused ports can also)
===================================================================
[HTML] View plaincopy<connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"/>
8009 Change to 8010 (other unused ports can also)
===================================================================
4. Restart Linux
Start two tomcat:
[HTML] View plaincopysh/usr/local/tomcat6-1/bin/startup.sh sh/usr/local/tomcat6-2/bin/startup.sh
5. Access address: http://192.168.0.13:8080 and http://192.168.0.13:8081
6. Success ...
NOTE: If you configure more than one, just follow this method to accumulate OK ...
Linux launches two Tomcat