Linux launches two Tomcat

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.