Deploy multiple Tomcat servers in Linux to run at the same time

Source: Internet
Author: User

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.

 

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.