-
Notifications
You must be signed in to change notification settings - Fork 5
LiferaySetup
To setup Liferay Portal server, follow the steps below. These steps are to be followed for each node in the cluster. To test this scenario at your machine, you can also use only one node and one instance of Liferay. In case you already have an environment to test, you can skip this section.
-
Download the Liferay Portal v6.2CEGA4 from sourceforge.net using the link – https://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.2.3%20GA4/liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip/download. It’s a zip file and contains app server with portal war pre-deployed. It’s a tomcat bundle distributed by Liferay itself.
-
Extract the zip file to a location. Let’s call this directory as LIFERAY_HOME.
-
The data directory contains the data needed and stored by the portal. The tomcat directory contains the app server which also has pre-deployed portal software.
-
For local setup purpose, only this setup is sometimes enough and you can just start tomcat by running startup.sh or startup.bat script in bin directory. That will start Liferay which is suitable enough for development purpose. But that’s not what we want, is it? Let’s create a file inside LIFERAY_HOME with name portal.ext.properties. We can add advanced settings in this file.
-
Install mysql in case you do not have it already. Create a database in it with name lportal_mes using character encoding to utf-8. Add database related properties to the portal-ext.properties file.
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://hostname:3306/lportal_mes?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=
Make sure you change, <hostname>. <dbuser>, <dbpass> to the actual values. -
Skip this step in case you are trying with only one node. Add cluster related properties to the portal-ext.properties file.
Cluster.link.enabled=true
cluster.link.autodetect.address=lportal.com:80
cluster.executor.debug.enabled=true
lucene.replicate.write=truemulticast.group.address[“cluster-link-control”]=239.255.0.1
multicast.group.port[“cluster-link-control”]=23311multicast.group.address[“cluster-link-udp”]=239.255.0.2
multicast.group.port[“cluster-link-udp”]=23312multicast.group.address[“cluster-link-mping”]=239.255.0.3
multicast.group.port[“cluster-link-mping”]=23313multicast.group.address[“hibernate”]=239.255.0.4
multicast.group.port[“hibernate”]=23314multicast.group.address[“multi-vm”]=239.255.0.5
multicast.group.port[“multi-vm”]=23315
Explaining all of the properties for Liferay Portal setting is out of the scope of the book. -
Install Elasticsearch 1.4.0 on a node. This is the version which Liferay supports through elasticray plugin which we are going to setup in next step. You can download the plugin from - https://web.liferay.com/marketplace/-/mp/application/41044606.
-
Create a directory named deploy inside LIFERAY_HOME and put elasticray plugin package file inside. When Liferay is started for the first time, it creates the directory deploy automatically. Liferay keeps track of this directory for any change, in case any installable portlet, utility is dropped into this directory, Liferay will make an attempt to install that as a plugin. Liferay will use Elasticray plugin for its search engine capability. Let’s add necessary properties for elasticray.
elasticsearch.serverIP=192.168.0.109
elasticsearch.portNumber=9300
elasticsearch.cluster.name=elasticsearchForLiferay
elasticsearch.index.name=liferay-es
Make sure to put correct ip, port, clustername and index name. -
Now start liferay by running – $ . /tomcat-7.0.42/bin/startup.sh
-
Liferay would take some time to start and for the first time, it would ask for some settings including database settings. For the database related properties, use from the step 5.
-
From the Admin panel, LDAP can be setup. By default, Liferay will be using database for user storage and authentication.