Apache+jboss Cluster deployment

Source: Internet
Author: User
Tags jboss

Cluster configuration on Jboss default mode [II]-operating system
Http://www.myexception.cn/operating-system/862858.html

Cluster configuration under Jboss default mode [II]
Install Apache

Install

unzipgzip-d Httpd-2.2.9.tar.gztar xvf httpd-2.2.9.tarconfigcd httpd-2.2.9./configure--prefix=/opt/ Apache2complilemakeinstall.make Install



Configuraion

Vi/opt/apache2/conf/httpd.conf
change user daemon and group daemon to user Apache and group Apache

Listen 192.168.150.75:80servername 192.168.150.75:80



ADD user and group for Apache:

Groupadd Apacheuseradd 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.



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 libloadmodule jk_module modules/mod_jk.so# Where to find workers. Propertiesjkworkersfile conf/workers.properties# Where to put JK Logsjklogfile logs/mod_jk.log# Set The JK log level [Debu G/error/info]jkloglevel info# Select the log Formatjklogstampformat "[%a%b%d%h:%m:%s%Y]" # jkoptions indicates to send SSK KEY sizejkoptions +forwardkeysize +forwarduricompat-forwarddirectories# jkrequestlogformatjkrequestlogformat "%w %V%T "Jkmountfile conf/uriworkermap.properties



Workers.properties

#Define list of workers that would be used# for mapping requestsworker.list=loadbalancer,status# Define node1# Modify the H OST as your host IP or DNS name.worker.node1.port=8009worker.node1.host=192.168.150.75worker.node1.type= ajp13worker.node1.lbfactor=1# Define prefered failover node for node1worker.node1.redirect=node2# Define node2# Modify The host as your host IP or DNS name.worker.node2.port=8009worker.node2.host=192.168.150.76worker.node2.type= ajp13worker.node2.lbfactor=2worker.node2.redirect=node1# load-balancing behaviourworker.loadbalancer.type= lbworker.loadbalancer.balance_workers=node1,node2worker.loadbalancer.sticky_session=1# Status worker for managing Load Balancerworker.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

Apache+jboss Cluster deployment

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.