Tomcat configuration Multi-instance: CentOS and Winserver environments

Source: Internet
Author: User
Tags server port

CentOS: Configuring multiple tomcat: 1. Download: # wget http://mirrors.cnnic.cn/apache/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz2, Decompression: # tar-zxv-f apache-tomcat-6.0.44.tar.gz3. Copy three copies: # Cp-r apache-tomcat-6.0.44 5i_net_014. Configure Server.xml Port: # vi/home/root/tomcat_server/tomcat_5i_net_01/conf/server.xml"Modification 1: Shutdown command port: 8101 increments" <server port= "8005" shutdown= "Shutdown" >"Modify 2:http port: 8201 increments; HTTPS port: 8401" <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>"Modify 3:AJP port: 8301 increments; HTTPS port: 8401" <connector port= "8009" protocol= " ajp/1.3" redirectport= "8443"/>5. Configure Server.xml virtual path: <context path= "/Publish Path" docbase= "Project WebContent" reloadable= "false" Casesensitive= "false" debug= "0" ></Context><context path= "" docbase= "/home/root/tomcat_roots/5i_net_01/root" reloadable= "false" Casesensitive= "false" debug= "0" ></Context>  CentOS:Tomcat startup script:

New startup script: # vi/home/root/tomcat_startup.sh

Add Execute Permissions: # chmod 777/home/root/tomcat_startup.sh Startup project: # sh/home/root/tomcat_startup.sh 5i_net_01 Start
############################################## #tomcat_home =/home/root/tomcat_servers/$1 start () {        Echo-n "starting Tomcat:"         #rm   $tomcat _home/logs/*-rf        RM   $tomcat _home/work/*-rf         $tomcat _home/bin/startup.sh        Tail-f $tomcat _home/logs/catalina.out        echo "Tomcat start OK."} Stop () {        echo-n "shutting down Tomcat:"         $tomcat _home/bin/shutdown. sh        echo "Tomcat stop OK."} # See how we were Calledcase "$" in        start)          &NB Sp      start                ;;         stop)                 STOP&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;            ;;         restart)                 stop      &NBSP ;         sleep 3                START&NBSP;&NBSP;&NBSP;&NBSP;&N bsp;           ;;         *)                 echo "Usage: $ {Start|stop|restart} "Esacexit 0##################################################### #ps-ef|grep ' ^.*java.* '" Tomcat-vst-order "'. *$ ' | Grep-v Grep|awk ' {print $} ' |xargs kill-9/opt/apache-tomcat-vst-order/bin/startup.shtail-f/opt/ apache-tomcat-vst-order/logs/catalina.out######################################################  Window Registration system service:In the CentOS system, Tomcat can be run in the background, it is very convenient, but in Windows system, Tomcat can only be opened as a command window, very awkward; The following method can be said more than Tomcat registration of different system services, note the port is different, you can set the boot start, very convenient; Enter the Tomcat bin directory and execute the following command (Service.bat does not exist, download 64bit, inside):Registration Service: Service.bat install tomcat8080 Delete Service: Service.bat uninstall tomcat8080 start service: net start tomcat8080 stop service: net stop tomcat8080 Error: Nonalpha 95, Reason: Windows2003 the service name of the operating system cannot be underlined "_"; official version difference: 1:zip (PGP, MD5)--Green version 2:tar.gz (PGP, MD5) 3:32-bit Windows Zip (p GP, MD5)--windows 32-bit Green Edition 4:64-bit Windows Zip (PGP, MD5)--Windows 64-bit Green edition 5:64-bit Itanium Windows Zip (PGP, MD5) 6:32-b It/64-bit Windows Service Installer (PGP, MD5)--Windows Installer the first and second are Tomcat's most basic packages, excluding components and other dependencies that are made for the win service, except that the compression format is different. The third fourth fifth ZIP format is a package for 32-bit or 64-bit or Itanium processors that contains the Windows service components, and some dependent components. The last one is the 32/64-bit system, the Windows Service installation package.

Tomcat configuration Multi-instance: CentOS and Winserver environments

Related Article

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.