Liferay 7.x Installation Guide (Tomcat + MySQL)
Liferay is a powerful enterprise portal and digital experience platform (DXP) used by organizations to build:
enterprise portals
intranet platforms
customer self-service portals
digital experience platforms
It is widely used for Java-based enterprise applications and integrates easily with backend systems.
In this guide we will walk through installing Liferay 7.x using Tomcat and MySQL, which is one of the most common production setups.
This article covers:
prerequisites
installing Java and MySQL
downloading Liferay
configuring the database
starting the Liferay server
Prerequisites
Before installing Liferay, ensure the following components are available.
| Requirement | Version |
|---|---|
| Java | JDK 8 or higher |
| Application Server | Apache Tomcat |
| Database | MySQL |
| RAM | Minimum 4 GB recommended |
Also ensure that JAVA_HOME is configured properly.
Example:
JAVA_HOME=/usr/lib/jvm/java-11
Step 1: Install MySQL
Install MySQL server and create a database for Liferay.
Example commands:
CREATE DATABASE lportal CHARACTER SET utf8;
Create a database user:
CREATE USER 'liferay'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON lportal.* TO 'liferay'@'localhost';
FLUSH PRIVILEGES;
This database will store portal data, users, content, and configurations.
Step 2: Download Liferay Bundle
Download the Liferay 7.x bundle from the official website.
The bundle typically includes:
Liferay portal
Apache Tomcat
default configurations
Extract the package:
liferay-ce-portal
Inside the directory you will see:
tomcat/
osgi/
data/
deploy/
These folders are important for Liferay runtime operations.
Step 3: Configure Database Connection
Create a file called:
portal-ext.properties
Add the following configuration:
jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8
jdbc.default.username=liferay
jdbc.default.password=password
Also place the MySQL connector JAR inside:
tomcat/lib/ext
This allows Liferay to connect to the MySQL database.
Step 4: Start Liferay Server
Start the Tomcat server.
Navigate to:
tomcat/bin
Run:
startup.sh
or on Windows:
startup.bat
The server will initialize and deploy Liferay modules.
During the first startup, Liferay will automatically create database tables and default portal configurations.
Step 5: Access the Liferay Portal
Once the server starts successfully, open a browser and visit:
http://localhost:8080
You will see the Liferay setup wizard.
From there you can configure:
administrator account
email settings
portal language
portal name
After completing the setup, the Liferay portal dashboard will be available.
Best Practices for Liferay Installation
When installing Liferay for production environments, consider these best practices:
✔ Use external databases like MySQL or PostgreSQL
✔ Configure JVM memory settings
✔ Use load balancing for scalability
✔ Store documents in external storage systems
These practices ensure a scalable and stable enterprise portal deployment.
Final Thoughts
Liferay remains one of the most powerful enterprise portal platforms available for Java developers.
Using Tomcat with MySQL provides a reliable and flexible setup for development and production environments.
With proper configuration, Liferay can power:
enterprise portals
digital experience platforms
intranet collaboration systems
This installation guide provides a simple starting point for developers and architects working with Liferay.
Recommended Articles
If you are working with enterprise Java platforms and workflow automation, you may also find these guides helpful.
Liferay vs Spring Boot – When to Use Which
Understand the difference between an enterprise portal platform and a Java backend framework.
https://shikhanirankari.blogspot.com/2026/03/liferay-vs-spring-boot-when-to-use-which.html
Camunda Timer Events Explained
Learn how BPMN timer events are used in workflow automation.
https://shikhanirankari.blogspot.com/2026/03/camunda-timer-events-explained-complete.html
Camunda Incident Handling Guide
Understand how Camunda manages failed jobs and workflow recovery.
https://shikhanirankari.blogspot.com/2026/03/camunda-incident-handling-guide.html
Comments
Post a Comment