Jboss default方式上的Cluster配置[三]

Jboss default方式下的Cluster配置[三]
Cluster Configuration


#vim /server/default/deploy/jboss-web.deployer/server.xml

<Engine name="jboss.web" defaultHost="localhost">

The node[i] must match the JK configrutaion.
<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node[i]">

#vim jboss_home/server/all/deploy/jboss-web.deployer/META-INF/jboss-service.xml
update the value of UseJK attribute as true


Auto Run Configuration

For Jboss

# cp $JBOSS_HOME/bin/jboss_init_redhat.sh  /etc/init.d/jboss
chmod -f 755 /etc/init.d/jboss

# ln -s /etc/init.d/jboss /etc/rc0.d/K20jboss
# ln -s /etc/init.d/jboss /etc/rc3.d/S80jboss
# ln -s /etc/init.d/jboss /etc/rc5.d/S80jboss
# ln -s /etc/init.d/jboss /etc/rc6.d/K20jboss


For apache

ln –s /opt/apache2/bin/apachectl /etc/init.d/apache

chmod 755 /etc/init.d/apache
ln –s /etc/init.d/apache /etc/rc3.d/S80apache
ln –s /etc/init.d/apache /etc/rc3.d/K20apache
ln –s /etc/init.d/apache /etc/rc4.d/S80apache
ln –s /etc/init.d/apache /etc/rc4.d/K20apache
ln –s /etc/init.d/apache /etc/rc5.d/S80apache
ln –s /etc/init.d/apache /etc/rc5.d/K20apache


Deployment

1. Shutdown the servers

./shutdown.sh -S --server=192.168.150.75 --user=admin --password=***
./shutdown.sh -S --server=192.168.150.76 --user=admin --password=***


2. Copy folders
Copy below folders of the project to the /opt/apache2/htdocs/application/ folder.

The folders:
images
style
css
js
support

3. Copy war file
Copy the application.war to the folder [Two nodes]:

/opt/jboss-4.2.2.GA/server/default/deploy

4. Start the servers [Two nodes]

Start apache:

service apache start


jboss start:

#./jboss_init_redhat.sh start
or
#service jboss start



5. Check the jkstatus

http:// 192.168.150.75/jkstatus