user name: liferay passwod : liferay
Commands:
Setting keyboard:
setxkbmap en_US
Home directory
cd /home/liferay
unzip VM-setup-files-v3.zip
chmod +x *.sh
sudo ./setup-apache.sh
sudo ./setup-mysql.sh
sudo ./setup-java.sh
sudo ./setup-elastic.sh
./cluster-setup.sh
Licence can be found from ~/Downloads folder
Search:
- Remove Elastic Modules (from both nodes .. node1 and node2):
cd /home/liferay/servers/cluster/node1/osgi/portal
rm com.liferay.portal.search.elasticsearch.shield.fragment.jar
rm com.liferay.portal.search.elasticsearch.shield.jar
(Restart) Node 1 : is http://localhost:7080 and Node 2: http://localhost:8080
- Configure Elastic Search Goto : Control Panel -> System Settings -> foundations -> Elastic search Edit
Cluster name : elasticsearch Operation mode: REMOTE Transport address: localhost:9300
- Reindex Control Panel -> Server Administration -> Reindex
Goto: http://localhost:9200/_plugin/head/ .. and you see Elastic search
Clustering ..
- change from node2 portal-ext.properties:
module.framework.properties.osgi.console=localhost:11311
port to 22311
- Uncomment following lines from both node
#dl.store.impl=com.liferay.portal.store.db.DBStore
#cluster.link.enabled=true
Setup tomcat to be ready fy sticky session
edit :
/home/liferay/servers/cluster/node1/tomcat-8.0.32/conf/server.xml
Change: to:
edit :
/home/liferay/servers/cluster/node2/tomcat-8.0.32/conf/server.xml
Change: to:
Setup Http server. (already installed by: setup-apache.sh script)
sudo su -
(password liferay)
cp /home/liferay/snippets/apache-conf-snippet.txt /etc/apache2/sites-available/liferay.conf
cd /etc/apache2/sites-enabled/
rm 000-default.conf
ln ../sites-available/liferay.conf 00-default.conf
apache2ctl restart
Login to Liferay at address: http://localhost
TCP clustering:
cd /home/liferay/servers/cluster
jar -xf node1/osgi/portal/com.liferay.portal.cluster.multiple.jar tcp.xml
Find following statement and comment that:
<TCPPING timeout="3000” initial_hosts="${jgroups.tcpping.initial_hosts:localhos[7800],localhost[7801]}” port_range="1” num_initial_members="10"/>
Replace with following:
<!-- USE FILE PING for node discovery CHANGE START -->
<FILE_PING location="${jgroups.fileping.location:/home/liferay/servers/cluster/groups}"/>
<!-- USE FILE PING for node discovery CHANGE END -->
Modify portal-ext.properties for both nodes and add:
cluster.link.channel.properties.control=/home/liferay/servers/cluster/tcp.xml
cluster.link.channel.properties.transport.0=/home/liferay/servers/cluster/tcp.xml
There seems to be a small typo on line 101: localhos[7800] should be localhost[7800]