Liferay 7 installation – A step by step guide

Liferay 7 installation is all you need to know before you start working with it.

Before start working with Liferay, you need to understand how to do Liferay 7 installation. Though starting from version 7, Liferay introduced OSGI framework, the installation and setup are more or less similar to its earlier release. In this article, I will explore all necessary and basic steps to perform Liferay 7 installation in your local environment.

At the time of writing this, Liferay 7 is the latest version released. It is full with new features. It is more powerful than ever before. You can refer my blog on Liferay 7 (DXP) introduction. Just like all earlier release, Liferay 7 comes with two flavours

  • Community Edition (CE)
  • Enterprise Edition (EE)

EE version is now called Digital Experience Portal or DXP in short. Needless to say that, CE version is still fully opensource and available freely.

The beauty of Liferay 7 lies in the OSGI container which facilitate the modular development. The clear difference you will experience is brand new and fresh look of Liferay 7 compare to all previous releases. Let us learn how to perform Liferay 7 installation.

Install Java 8

The first step in Liferay 7 installation is to install Java. Since, Liferay 7 is compatible with Java 8 (and higher version) only, you need to install Java 8 first. Liferay took this decision to use all latest features of Java. Also Oracle has announced to stop any further support for Java 7.

You can refer article on How to install Java on Widows machine and make Java 8 ready before any further action. In that article, please choose Java 8 while downloading it from oracle site.

Liferay 7 Installation

After installing Java 8, you are ready for Liferay 7 installation. At the time of writing this, 7.1 is the latest version released by Liferay. You can download Liferay 7.1 from below links.

Please note that CE version is completely free while DXP version has 30 days trial period. Once expired, you must have to supply valid license file.

Liferay is a portal and comes as a bundle with Tomcat (since long) and Wildfly (recently introduced). Wildfly is community project from RedHat company. It is another application server. At this moment, Liferay is recommending to use Tomcat bundle in standalone environment. So in our case, we will use Liferay 7.1 with tomcat bundle.

Download & Other setup.

Let us first download Liferay 7.1. We will use CE version. Download it from this link. It is in form of ZIP file. Extract it on some folder in your local. Liferay ships with default database called HSQLDB. It is embedded (in memory) database and no setup is required. However Liferay does not recommend to use it in production environment.

It would be always great idea to start Liferay server with MySQL database. You need to instruct Liferay to use MySQL instead of HSQLDB (default) database. For this, just create one file called just under the extracted folder of Liferay server in previous step.

Add following content to file.

These are JDBC properties used by Liferay 7 to establish interaction with MySQL database. You also need to create a schema – liferay71ce in MySQL, which I have mentioned in jdbc.default.url property above.

Note: For Liferay 7, you need to install MySQL 5.7 or above.

Settings for Performance improvement in Local

After this. open \tomcat-9.0.6\bin directory from the folder where you unzip the liferay 7.

Before starting Liferay we will do some settings to increase the performance of Liferay in local environment. Open setenv.bat file in above folder – tomcat-9.0.6\bin. You will see its content as below.

We will update the value of CATALINA_OPTS variable as per be below snippet.

I have added few JVM options to improve the performance along with Xms and XmX which represents initial and max memory respectively. You can set the value of Xms and Xmx based on your system configuration and available memory.

You can refer below links to get more detailed information about performance in Liferay


You are now ready to start Liferay 7.1. Find startup.bat in same directory and double click on it to start Liferay 7. Since this is first time, Liferay will create all database table along with sample data and hence it will take little longer time.

Second and subsequent times, Liferay server will take comparatively less time to start. You will see a tomcat console showing all logs during the startup. Once server is up, you will see first screen on browser as below.

Liferay 7 configuration - Liferay 7 installation

If you wish, you can update Portal Name, First Name. Last Name, Email and Default Language of the portal from Basic Configuration section. The default details are suffice for local setup and hence I will keep it as it is. Just click on Finish Configuration button, and Liferay will complete the last step of doing configuration. This is one time task. Liferay will not ask to set these data next time onward.

Once you save the configuration, Liferay will ask to restart the server to make the above changes in effect. Just press Ctrl+C from the tomcat (Liferay) console and allow some time to shut down it. The tomcat window will be disappeared on successful shut down. This is the last step in Liferay 7 installation.

First time activities

Double click on startup.bat file again to start the server. Once server is up and running, you need to login with email address and password. Give the email address (in above case) and password as test.

The default password is test. On successful login, Liferay will ask Terms of Use and you have to accept it. In next screen, Liferay will ask to update the password. After that the next screen will ask you to set security question. Congratulations, you have successfully completed liferay 7 installation.

By default this user ( is super admin of liferay portal. Hence it has full access of everything on Liferay 7.

Liferay 7.1 folder structure

Let us get some basic understanding of folder structure of Liferay server. You will see the project structure of Liferay as per below screenshot.

Liferay 7 folder structure - Liferay 7 installation


  • data: Lifeary 7 stores various data like document library files (in encrypted format), elastic search index files and HSQLDB (in memory) database details in this folder.
  • deploy: This is the folder where you can deploy OSGI modules (JARs) files and WARs files.
  • license: This folder contains some copyrights information about the product.
  • logs: There is where the logs are generated.
  • osgi: This is the folder where all OSGI specific information are stored. For example, Liferay deploys all OSGI modules in osgi/modules folder while the WARs in osgi/war folder. The folder osgi/marketplace stores lpkg files which contains the executable out of the box liferay modules. In contrast, all previous releases of Liferay (till 6.2), the liferay executable code was stored inside ROOT folder of tomcat.
  • tomcat-9.0.6: This is tomcat folder. Since we are using tomcat bundle, all tomcat specific files are available inside this folder.
  • tools: This folder contains few of the tools which are used for various purpose like migration from previous releases.
  • work: it is temporary folder created by OSGI container.
  • : Liferay reads this file on startup. You can override any specific properties in this file. You can also define your own custom properties which is available across the portal.
  • : This file stores the Basic Configuration information about Liferay.

Finally, you are now ready to use Liferay 7.1 portal. We have seen these steps for Windows. Similarly for other operating systems, above steps are more or less like same. Obviously, it will differ in setting environment variable and choosing specific file to start Liferay. For example in case of Linux, you need to use .sh files (i.e. etc.)


Recommended For You

About the Author: Nilang

Nilang Patel is a technology evangelist who loves to spread knowledge and helping people in all possible ways. He is an author of two technical books - Java 9 Dependency and Spring 5.0 Projects.


  1. Have a startup problem, I’m absolutly beginner on Java and Liferay so I dont know how to do.
    The catalina.out log is the following:

    19-Jul-2019 11:42:49.350 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [755] milliseconds
    Loading jar:file:/Applications/liferay-ce-portal-7.2.0-ga1/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by com.liferay.petra.reflect.ReflectionUtil (file:/Applications/liferay-ce-portal-7.2.0-ga1/tomcat-9.0.17/lib/ext/com.liferay.petra.reflect.jar) to method java.lang.Object.clone()
    WARNING: Please consider reporting this to the maintainers of com.liferay.petra.reflect.ReflectionUtil
    WARNING: Use –illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    19-Jul-2019 11:42:50.755 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.liferay.portal.spring.context.PortalContextLoaderListener]
    at com.liferay.petra.reflect.ReflectionUtil.(
    at com.liferay.portal.spring.context.PortalContextLoaderListener.(
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(
    at java.base/java.lang.reflect.Constructor.newInstance(
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(
    at org.apache.catalina.core.StandardContext.listenerStart(
    at org.apache.catalina.core.StandardContext.startInternal(
    at org.apache.catalina.util.LifecycleBase.start(
    at org.apache.catalina.core.ContainerBase.addChildInternal(
    at org.apache.catalina.core.ContainerBase.addChild(
    at org.apache.catalina.core.StandardHost.addChild(
    at org.apache.catalina.startup.HostConfig.deployDescriptor(
    at org.apache.catalina.startup.HostConfig$
    at java.base/java.util.concurrent.Executors$
    at java.base/
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(
    at java.base/java.util.concurrent.AbstractExecutorService.submit(
    at org.apache.catalina.startup.HostConfig.deployDescriptors(
    at org.apache.catalina.startup.HostConfig.deployApps(
    at org.apache.catalina.startup.HostConfig.start(
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
    at org.apache.catalina.util.LifecycleBase.setStateInternal(
    at org.apache.catalina.util.LifecycleBase.setState(
    at org.apache.catalina.core.ContainerBase.startInternal(
    at org.apache.catalina.core.StandardHost.startInternal(
    at org.apache.catalina.util.LifecycleBase.start(
    at org.apache.catalina.core.ContainerBase$
    at org.apache.catalina.core.ContainerBase$
    at java.base/
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(
    at java.base/java.util.concurrent.AbstractExecutorService.submit(
    at org.apache.catalina.core.ContainerBase.startInternal(
    at org.apache.catalina.core.StandardEngine.startInternal(
    at org.apache.catalina.util.LifecycleBase.start(
    at org.apache.catalina.core.StandardService.startInternal(
    at org.apache.catalina.util.LifecycleBase.start(
    at org.apache.catalina.core.StandardServer.startInternal(
    at org.apache.catalina.util.LifecycleBase.start(
    at org.apache.catalina.startup.Catalina.start(
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.base/java.lang.reflect.Method.invoke(
    at org.apache.catalina.startup.Bootstrap.start(
    at org.apache.catalina.startup.Bootstrap.main(
    Caused by: java.lang.NoSuchFieldException: modifiers
    at java.base/java.lang.Class.getDeclaredField(
    at com.liferay.petra.reflect.ReflectionUtil.(
    … 48 more

    19-Jul-2019 11:42:50.757 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
    19-Jul-2019 11:42:50.758 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
    19-Jul-2019 11:42:50.766 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
    19-Jul-2019 11:42:50.932 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1,576] milliseconds

    It’s clear to me I have a warning of “illegal reflective access operation” but I think the problem (Liferay portal don’t start) is the error on the listener at com.liferay.petra.reflect.ReflectionUtil but I haven’t found nothing to help me to solve that!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.