Tomcat5.5.12配置負載均衡
Tomcat5.5.12配置負載均衡
參考:
[@more@]1:安裝準備
下載Tomcat5.5.12.zip;apache_2.0.55-win32-x86-no_ssl;mod_jk.dll;
2:解壓縮Tomcat5.5.12.zip設定環境變數(JAVA_HOME=C:Program FilesJavajdk1.5.0_02),安裝apache_2.0.55-win32-x86-no_ssl(安裝時需要填寫本機的計算機名!!)
3:把mod_jk.dll COPY到..Apache2modules下,在..Apache2conf下建新檔案workers.properties,檔案內容:
#
# workers.properties
#
# In Unix, we use forward slashes:
ps=/
# list the workers by name
worker.list=tomcat1, tomcat2, loadbalancer
# ------------------------
# First tomcat server
# ------------------------
worker.tomcat1.port=11009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
# Specify the size of the open connection cache.
#worker.tomcat1.cachesize
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.tomcat1.lbfactor=100
# ------------------------
# Second tomcat server
# ------------------------
worker.tomcat2.port=12009
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
# Specify the size of the open connection cache.
#worker.tomcat2.cachesize
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.tomcat2.lbfactor=100
# ------------------------
# Load Balancer worker
# ------------------------
#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2
#
# END workers.properties
#
4:設定confhttpd.config檔案
在# Example:
# LoadModule foo_module modules/mod_foo.so
#下新增
LoadModule jk_module modules/mod_jk.dll
#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
在DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"下新增:
JkMount /*.jsp loadbalancer
JkMount /* loadbalancer
JkMount /servlet/* loadbalancer
5:配置tomcat的server.xml檔案
(1)把
tomcat1:
tomcat2:
(2)把 (3)把 (4)把 (5)去掉註釋
tcpListenAddress="auto"
tomcat1: tcpListenPort="4001"
tomcat2: tcpListenPort="4002"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
……………………
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/300209/viewspace-810968/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nginx配置+uwsgi+負載均衡配置Nginx負載
- IdentityServer4 負載均衡配置IDEServer負載
- Nginx/Httpd負載均衡tomcat配置Nginxhttpd負載Tomcat
- 使用Nginx配置TCP負載均衡NginxTCP負載
- nginx安裝及負載均衡配置Nginx負載
- 做了反向代理和負載均衡的nginx配置檔案簡單示例(nginx.conf) HTTP負載均衡/TCP負載均衡負載NginxHTTPTCP
- LVS負載均衡配置與keepalive服務配置負載
- gRPC負載均衡(自定義負載均衡策略)RPC負載
- gRPC負載均衡(客戶端負載均衡)RPC負載客戶端
- 負載均衡負載
- Ribbon負載均衡策略與自定義配置負載
- nginx配置web服務|反向代理|負載均衡NginxWeb負載
- RHEL 7配置HAProxy實現Web負載均衡Web負載
- Nginx 兩臺伺服器配置負載均衡!!!Nginx伺服器負載
- docker下nginx反向代理和負載均衡配置DockerNginx負載
- 阿里雲負載均衡SSL證書配置(更新)阿里負載
- nginx負載均衡Nginx負載
- LVS 負載均衡負載
- 【Nginx】負載均衡Nginx負載
- NGINX 負載均衡Nginx負載
- LoadBalancer負載均衡負載
- IP負載均衡負載
- WebSocket負載均衡Web負載
- 負載均衡---ribbon負載
- 解密負載均衡技術和負載均衡演算法解密負載演算法
- 負載均衡技術(一)———負載均衡技術介紹負載
- 【知識分享】四層負載均衡和七層負載均衡負載
- 負載均衡技術(二)———常用負載均衡服務介紹負載
- 記一次nginx負載均衡配置情況Nginx負載
- 負載均衡補充負載
- 負載均衡4層負載
- 負載均衡詳解負載
- gRPC的負載均衡RPC負載
- 負載均衡之keepalived負載
- 負載均衡知多少?負載
- Linux LVS 負載均衡Linux負載
- 淺談負載均衡負載
- 負載均衡叢集負載
- LVS負載均衡群集負載