Y el Apache Tomcat cúmulo Liunx

  

conjunto de envase requerido

jdk-1_5_0-linux-i586-rpm.bin ---- Jkd

apache-tomcat-5.5.27. tar.gz --- Tomcat

httpd-2.0.63.tar.gz --- Apache

jakarta-conectores-jk-1.2.1-src.tar.gz - --Apache y Tomcat conector


instalación

1, instalar Tomcat, Apache, mod_jk tiene un artículo que explica

fichero de configuración


1 de configuración, modificar Apache2 /conf /httpd.conf presentar

añade al final
p> LoadModule jk_module

JkMount /* los trabajadores


2, en el nuevo apache2 /conf /workers.properties directorio de archivos siguiente

= worker.list trabajadores, tomcat1, tomcat2

# ======== ======== tomcat1

worker.tomcat1 .type = ajp13worker.tomcat1.port = 8009 # ajp13 número de puerto en la configuración server.xml, por defecto 8009worker.tomcat1.host = localhost #tomcat dirección de host, si Tomcat no nativa bajo, rellene el worker.tomcat1 dirección IP . lbfactor = 1worker.tomcat1.fail_on_status = -500, -503 404

# ======== ======== tomcat2 worker.tomcat2.type = = ajp13worker.tomcat2.port 8010worker .tomcat2.host = localhost worker.tomcat2.lbfactor = 1worker.tomcat2.fail_on_status = 500,503, -404

# ======== controlador, un controlador de equilibrio de carga ======= = = worker.workers.type lbworker.retries = = 5worker.workers.balance_workers tomcat1, tomcat2worker.workers.sticky_session = trueworker.workers.sticky_session_force = false



3, para resolver el conflicto, si se ha implementado múltiples Tomcat en el mismo PC
necesario modificar el puerto Tomcat, < XMLNamespace prefix = " o " ns = " urn: schemas-microsoft-com: office: oficina " />

encontrado Tomcat conf //server.xml como
locales

< puerto del servidor = " 8005 " apagado = " pARADA " >

< conector de puerto = " 8080 " protocolo = " HTTP /1.1 " ConnectionTimeout = " 20000 " redirectPort = " 8443 " />

< puerto de conector = " 8009 " Protocolo = " A JP /1.3 " redirectPort = " 8443 " />

modificar

8005 ------- > 8015

8080 ---- . - > 8081

8009 ------ > 8019

Nota: < puerto de conector = " 8009 " protocolo = " AJP /1.3 " redirectPort = " 8443 " />

en el puerto al archivo workers.properties configurado con la misma worker.tomcat2.port = 8,019


4 dispuestos replicación Sesión

1 "respectivamente para encontrar cada Tomcat /conf /server.xl en

< nombre Engine = " Catalina " defaultHost = " localhost " >

modificar

< nombre Engine = " Catalina " defaultHost = " localhost " jvmRoute = " tomcat1 " >

< nombre Engine = " Catalina " defaultHost = " localhost " jvmRoute = " tomcat2 " >

2 ", respectivamente, en cada Tomcat /conf /server.xml de

< nombre Engine = " Catalina " defaultHost = " localhost " jvmRoute = " tomcat1 " >

etiquetas
añadió

< Cluster className = " org.apache.catalina.ha.tcp .SimpleTcpCluster "

channelSendOptions = " 6 " >


<! -

< Administrador className = " org.apache .catalina.ha.session.BackupManager "

expireSessionsOnShutdown = " falso "

notifyListenersOnReplication = " verdadero "

mapSendOptions = " 6 " />

- >

< Administrador className = " org.apache.catalina.ha.session.DeltaManager "

expireSessionsOnShutdown = " falso "

notifyListenersOnReplication = " verdadero " />


< Channel className = " org.apache.catalina.tribes.group.GroupChannel " >

< membresía className = " " org.apache.catalina.tribes.membership.McastService;

dirección = " " 228.0.0.4;

puerto = " 45564 "

frecuencia = " 500 "

dropTime = " 3000 " />

< receptor className = " org.apache.catalina.tribes.transport.nio.NioReceiver "

dirección = " " automático;

puerto = " 5002 "

selectorTimeout = " 100 "

maxThreads = " 6 " />


< Remitente className = " org.apache.catalina.tribes .transport.ReplicationTransmitter " >

< Transporte className = " org.apache.catalina.tribes.transport.nio.PooledParallelSender " />

< /remitente >

< Interceptor className = " org.apache.catalina.tribes.group.interceptors.TcpFailureDetector " />

< Interceptor className = " org.apache.catalina.tribes.group .interceptors.MessageDispatch15Interceptor " />

< Interceptor className = " org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor " />

< /canal >


< válvula className = " org.apache.catalina.ha.tcp.ReplicationValve "

filter = " .. * \\ gif;. * \\. JS; .. * \\ jpg; * .. \\ png; .. * \\ htm;. * \\ html; .. * \\ css; .. * \\ txt;. " />


< Deployer className = " org.apache.catalina.ha.deploy.FarmWarDeployer "

Copyright © Conocimiento de Windows All Rights Reserved