Welcome to the world of Liferay! If you’re just beginning your journey with the Liferay Digital Experience Platform (DXP), Liferay Workspace Setup is your first crucial step. This guide will walk you through installing and configuring a Liferay development environment in an easily understandable and practical way.
Table of Contents
What is Liferay Workspace?
Liferay Workspace is a set of tools and an environment designed to streamline working with Liferay DXP. It helps manage the lifecycle of Liferay projects, from development to production.
Prerequisites
Before starting, ensure you have:
- Java JDK: Required for running Liferay DXP. Download and install Java JDK.
- Node.js: Necessary for building Liferay themes and front-end tasks. Download Node.js.
Please check JDK Requirements for Different Versions of Liferay DXP
Step 1: Installing Liferay Workspace
- Download Liferay Workspace: Visit Liferay’s official site for the latest version of Liferay Workspace. Choose the version suitable for your OS.
- Unzip the File: Extract the files to your desired location. This directory is your ‘Liferay Workspace’.
Step 2: Setting Up Liferay DXP
- Navigate to Workspace: Open a terminal or command prompt and navigate to the Liferay Workspace directory.
- Initialize Liferay DXP: Run
./gradlew initBundle
. This command downloads and initializes Liferay DXP with Tomcat as the default server. - Wait for Completion: The process might take time due to downloading components.
Step 3: Starting Liferay DXP
- Go to the bundles Folder: Inside the Liferay Workspace, find the ‘bundles’ folder where Liferay DXP resides.
- Start Liferay DXP: Run
./start.sh
(Unix/Linux/Mac) orstart.bat
(Windows) in the ‘bundles’ folder. - Access Liferay DXP: Open a browser and go to
http://localhost:8080
. Follow the setup wizard.
Step 4: Exploring Liferay Workspace
- Modules: Create OSGi modules including portlets, themes, and service builders here.
- Themes: Develop themes for Liferay DXP.
- Configs: Contains configuration files for different environments.
Step 5: Building Your First Project
- Create a Project: In the terminal, run
./gradlew create -t mvc-portlet -d modules/my-first-portlet
to create a sample MVC portlet. - Build and Deploy: Navigate to
modules/my-first-portlet
and run../gradlew
deploy. - View Your Portlet: Refresh your Liferay DXP page. Your new portlet should be under ‘Applications’ → ‘Sample’.
Conclusion
Congratulations on setting up your first Liferay Workspace and deploying a sample project! This is the beginning of your journey with Liferay DXP. Explore and build amazing digital experiences.
For any issues or questions, the Liferay community is a great resource for support and knowledge.
Happy Liferay Learning!