# ls -al /usr/local
---------------------------------------------------------------------------------------------------------------------------
tomcat -> apache-tomcat-6.0.26/
tomcat1 -> apache-tomcat-6.0.26_1/
tomcat2 -> apache-tomcat-6.0.26_2/

 


/usr/local/apache2/bin/httpd -l
---------------------------------------------------------------------------------------------------------------------------

 


/usr/local/apache2/conf/extra/httpd-mpm.conf
---------------------------------------------------------------------------------------------------------------------------

<IfModule mpm_worker_module>
    StartServers 20
    MaxClients  1280
    MinSpareThreads 64
    MaxSpareThreads 128 
    ThreadsPerChild 64
    MaxRequestsPerChild 0
</IfModule>

 

/usr/local/apache2/conf/extra/httpd-vhosts.conf
---------------------------------------------------------------------------------------------------------------------------

<VirtualHost *:80>
    ServerAdmin admin@kxx.ac.kr
    DocumentRoot /data/webuser/www
    ServerName 2XX.247.29.153
    ServerAlias www.kxx.ac.kr www.kxx2.ac.kr lb2.kxx.ac.kr
#   CustomLog logs/kxx.ac.kr-access_log common env=!image-request
    CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/kxx.ac.kr-access_%Y%m%d.log" common env=!image-request
    jkMount /*.jsp      loadbalancer
    jkMount /*.do       loadbalancer
    jkMount /servlet/*  loadbalancer
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /data/webuser/www/it
    ServerName edu.kxx.ac.kr
    jkMount /*.jsp      loadbalancer
    jkMount /*.do       loadbalancer
    jkMount /servlet/*  loadbalancer
</VirtualHost>

 

/usr/local/apache2/conf/mod_jk.conf
---------------------------------------------------------------------------------------------------------------------------

LoadModule jk_module    modules/mod_jk.so

<IfModule mod_jk.c>
JkWorkersFile conf/workers.properties
JkShmFile logs/mod_jk.shm
#JkLogFile logs/mod_jk.log
JkLogFile       "|/usr/local/sbin/cronolog /usr/local/apache2/logs/mod_jk.%Y%m%d.log"
JkLogLevel info
JkRequestLogFormat "%w %V %T"
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
</IfModule>

 


/usr/local/apache2/conf/workers.properties
---------------------------------------------------------------------------------------------------------------------------

workers.tomcat_home=/usr/local/tomcat,/usr/local/tomcat1,/usr/local/tomcat2
workers.java_home=/usr/local/java
ps=/

worker.list=tomcat00,tomcat01,tomcat10,tomcat11,tomcat20,tomcat21,loadbalancer

#tomcat
worker.tomcat00.type=ajp13
worker.tomcat00.host=localhost
worker.tomcat00.socket_timeout=10
worker.tomcat00.port=8009
worker.tomcat00.lbfactor=100

worker.tomcat01.type=ajp13
worker.tomcat01.host=localhost
worker.tomcat01.socket_timeout=10
worker.tomcat01.port=8019
worker.tomcat01.lbfactor=100


#tomcat1
worker.tomcat10.type=ajp13
worker.tomcat10.host=localhost
worker.tomcat10.socket_timeout=10
worker.tomcat10.port=18009
worker.tomcat10.lbfactor=100

worker.tomcat11.type=ajp13
worker.tomcat11.host=localhost
worker.tomcat11.socket_timeout=10
worker.tomcat11.port=18019
worker.tomcat11.lbfactor=100


#tomcat2
worker.tomcat20.type=ajp13
worker.tomcat20.host=localhost
worker.tomcat20.socket_timeout=10
worker.tomcat20.port=28009
worker.tomcat20.lbfactor=100

worker.tomcat21.type=ajp13
worker.tomcat21.host=localhost
worker.tomcat21.socket_timeout=10
worker.tomcat21.port=28019
worker.tomcat21.lbfactor=100

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat00,tomcat01,tomcat10,tomcat11,tomcat20,tomcat21
worker.inprocess.type=jni

 

 

/usr/local/apache-tomcat-6.0.26/bin/catalina.sh
---------------------------------------------------------------------------------------------------------------------------
CATALINA_HOME=/usr/local/tomcat


/usr/local/apache-tomcat-6.0.26_1/bin/catalina.sh
---------------------------------------------------------------------------------------------------------------------------
CATALINA_HOME=/usr/local/tomcat1


/usr/local/apache-tomcat-6.0.26_2/bin/catalina.sh
---------------------------------------------------------------------------------------------------------------------------
CATALINA_HOME=/usr/local/tomcat2

 

 

/usr/local/apache-tomcat-6.0.26/conf/server.xml
---------------------------------------------------------------------------------------------------------------------------
/usr/local/apache-tomcat-6.0.26_1/conf/server.xml
---------------------------------------------------------------------------------------------------------------------------
/usr/local/apache-tomcat-6.0.26_2/conf/server.xml
---------------------------------------------------------------------------------------------------------------------------

150 서버            tomcat          tomcat1         tomcat2
--------------------------------------------------------------------------------------------
Server port         8005            18005           28005
Service name        Catalina00      Catalina10      Catalina20
HTTP port           8080            18080           28080
AJP 1.3 port        8009            18009           28009
redirectPort        8443            18443           28443
Engine name         Catalina00      Catalina10      Catalina20
jvmRoute            tomcat00        tomcat10        tomcat20
Membership address  228.0.0.4       228.0.0.4       228.0.0.4
Membership port     45565           45565           45565
Receiver port       4000            4010            4020
--------------------------------------------------------------------------------------------
Service name        Catalina01      Catalina11      Catalina21
HTTP port           8081            18081           28081
AJP 1.3 port        8019            18019           28019
redirectPort        8444            18444           28444
Engine name         Catalina01      Catalina11      Catalina21
jvmRoute            tomcat01        tomcat11        tomcat21
Membership address  228.0.0.4       228.0.0.4       228.0.0.4
Membership port     45565           45565           45565
Receiver port       4001            4011            4021

 

153 서버             tomcat          tomcat1         tomcat2
--------------------------------------------------------------------------------------------
Server port         8005            18005           28005
Service name        Catalina00      Catalina10      Catalina20
HTTP port           8080            18080           28080
AJP 1.3 port        8009            18009           28009
redirectPort        8443            18443           28443
Engine name         Catalina00      Catalina10      Catalina20
jvmRoute            tomcat00        tomcat10        tomcat20
Membership address  228.0.0.5       228.0.0.5       228.0.0.5
Membership port     45565           45565           45565
Receiver port       5000            5010            5020
--------------------------------------------------------------------------------------------
Service name        Catalina01      Catalina11      Catalina21
HTTP port           8081            18081           28081
AJP 1.3 port        8019            18019           28019
redirectPort        8444            18444           28444
Engine name         Catalina01      Catalina11      Catalina21
jvmRoute            tomcat01        tomcat11        tomcat21
Membership address  228.0.0.5       228.0.0.5       228.0.0.5
Membership port     45565           45565           45565
Receiver port       5001            5011            5021