首页 技术 正文
技术 2022年11月7日
0 收藏 811 点赞 793 浏览 2251 个字

Jboss default方式上的Cluster配置[二] – 操作系统
http://www.myexception.cn/operating-system/862858.html

Jboss default方式下的Cluster配置[二]
Install Apache

Install

Unzip
gzip -d httpd-2.2.9.tar.gz
tar xvf httpd-2.2.9.tarConfig
cd httpd-2.2.9
./configure --prefix=/opt/apache2Complile
makeInstall.
make install

Configuraion

vi /opt/apache2/conf/httpd.conf
将User daemon和Group daemon改为User apache和Group apache

Listen 192.168.150.75:80
ServerName 192.168.150.75:80

Add user and group for apache:

groupadd apache
useradd apache –g apache

Check

./apachectl configtest

Install Mod_JK

Install

Rename mod_jk-1.2.26-httpd-2.2.6.so to mod_jk.so;

#mv mod_jk-1.2.26-httpd-2.2.6.so mod_jk.so

Copy to the folder /opt/apache2/modules.

#cp /home/tools/mod_jk.so 

Configuration

Add the below line in the bottom of /opt/apache2/conf/httpd.conf:

Include conf/mod_jk.conf

Copy the files to the folder:

/opt/apache2/conf

mod_jk.conf

# Load mod_jk module
# Specify the filename of the mod_jk lib
loadModule jk_module modules/mod_jk.so# Where to find workers.properties
JkWorkersFile conf/workers.properties# Where to put jk logs
JkLogFile logs/mod_jk.log# Set the jk log level [debug/error/info]
JkLogLevel info# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
JkMountFile conf/uriworkermap.properties

workers.properties

#Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=192.168.150.75
worker.node1.type=ajp13
worker.node1.lbfactor=1# Define prefered failover node for node1
worker.node1.redirect=node2# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=192.168.150.76
worker.node2.type=ajp13
worker.node2.lbfactor=2
worker.node2.redirect=node1# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1# Status worker for managing load balancer
worker.status.type=status

uriworkermap.properties

/application/*=loadbalancer
/jkstatus=status
#/*.jsp=loadbalancer
#/*.do=loadbalancer
!/*.gif=loadbalancer
!/*.msi=loadbalancer
!/*.exe=loadbalancer
!/*.jpg=loadbalancer
!/*.png=loadbalancer
!/*.css=loadbalancer
!/js/*.js=loadbalancer
#!/*.htm=loadbalancer
#!/*.html=loadbalancer
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,906
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,430
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,247
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,058
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,690
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,727