Prerequisites
- liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip
- ehcache-cluster-web-6.1.20.1-ee-ga2-20120731110418084.war
- liferay-portal-src-6.1.20-ee-ga2-20120731110418084.zip
- 2 Linux nodes with JDK installed
- Liferay Cluster License
- Firewall should be off in both nodes
Follow below steps for Liferay 6.1 EE GA2 Cluster Configuration
1. Extract liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip in /opt/ in both nodes. Rename extracted directory name to liferay. (ex: /opt/liferay)
2. Create portal-ext.properties file in /opt/liferay in both nodes and add below cluster related properties. Both Liferay nodes should be pointing to single Database.
net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml
cluster.link.enabled=true
lucene.replicate.write=true
ehcache.cluster.link.replication.enabled=true
web.server.display.node=true
org.quartz.jobStore.isClustered=true
- liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip
- ehcache-cluster-web-6.1.20.1-ee-ga2-20120731110418084.war
- liferay-portal-src-6.1.20-ee-ga2-20120731110418084.zip
- 2 Linux nodes with JDK installed
- Liferay Cluster License
- Firewall should be off in both nodes
Follow below steps for Liferay 6.1 EE GA2 Cluster Configuration
1. Extract liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip in /opt/ in both nodes. Rename extracted directory name to liferay. (ex: /opt/liferay)
2. Create portal-ext.properties file in /opt/liferay in both nodes and add below cluster related properties. Both Liferay nodes should be pointing to single Database.
net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml
cluster.link.enabled=true
lucene.replicate.write=true
ehcache.cluster.link.replication.enabled=true
web.server.display.node=true
org.quartz.jobStore.isClustered=true
3. Add jvmRoute parameter in both node's /opt/liferay/tomcat-7.0.27/conf/server.xml file.
before:
<Engine name="Catalina" defaultHost="localhost" >
After:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
note: here in node1 we are using jvm1 as jvmRoute. But in node2 you should use jvm2 as jvmRoute.
4. Now add below cluster snippet in tomcat/conf/server.xml file.
5. Now Add <distributable/> in /opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/web.xml before </web-app>.
6. Now extract below two files from liferay-portal-src-6.1.20-ee-ga2-20120731110418084/portal-impl/src/ehcache. And add these files at /opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/myehcache folder.
liferay-multi-vm-clustered.xml
hibernate-clustered.xml
7. Now start both Liferay nodes.
Configuration at Web server.
Here I assume that you have configured mod_jk module with Apache. So I have shown load balancer configuration of worker.properties file only.
You can mount it using below command.
JkMount /* loadbalancer
JkMount /* loadbalancer
Hi Alpesh,
ReplyDeleteGreat Article of configuring Liferay Cluster between two node cluster.
Hi Alpesh, Its Very Nice Article.....
ReplyDelete