Loading Audio...

Listen to Lesson
0:00
  • Speed 0.5x
  • Speed 0.75x
  • Speed 1x
  • Speed 1.25x
  • Speed 1.5x
  • Speed 2x
  • Brian
  • Caris

Course Environment Setup

Throughout this course, you'll use a local Liferay environment to implement Clarity's applications. Instead of starting from scratch, you'll use a partially complete solution provided in a Liferay workspace: liferay-course-publishing-tool-and-content-lifecycle.

Setting Up the Clarity Workspace

Liferay's Course Launcher tool automatically prepares your system and sets up a dedicated workspace for course exercises. This tool:

  • Checks if Java 21 is installed in your system. If not, it installs Zulu JRE 21 from Azul.
  • Downloads and configures the course workspace.
  • Initializes the local Liferay DXP bundle.

Here, you'll run the course launcher tool to prepare your system and set up the Clarity workspace you'll use in course exercises.

NOTE
To avoid resetting your progress, perform these steps only once. To start an existing Liferay server, only repeat steps 4-11.
  1. Open your terminal and run this command according to your operating system:
    Linux/Unix:

    /bin/bash -c "$(curl -fsSL https://raw.github.com/liferay/liferay-enablement-script-library/main/content-manager-course-setup.sh)" -- --publishing-tool-and-content-lifecycle linux

    Mac:

    /bin/bash -c "$(curl -fsSL https://raw.github.com/liferay/liferay-enablement-script-library/main/content-manager-course-setup.sh)" -- --publishing-tool-and-content-lifecycle mac

    Windows:

    powershell Set-ExecutionPolicy Bypass -Scope Process -Force; iex "& { $(irm https://raw.githubusercontent.com/liferay/liferay-enablement-script-library/refs/heads/main/content-manager-course-setup.ps1); install-course --publishing-tool-and-content-lifecycle }"

    This executes the course launcher tool, which automatically checks for and installs Java JDK 21, downloads the course’s files, and prepares the Liferay DXP bundle. This process may take a few minutes to complete.

    This executes the course launcher tool.

    NOTE
    If you encounter errors or are unable to proceed, contact Liferay’s Enablement team through these channels:

  2. Once the “Liferay bundle initialized” message displays, verify the liferay-course-publishing-tool-and-content-lifecycle/ folder was created.

  3. Go to the workspace's root folder in your terminal:

    cd liferay-course-publishing-tool-and-content-lifecycle/
  4. Run this command to start the Liferay server:
    Unix-based:

    ./bundles/tomcat/bin/startup.sh

    Windows:

    .\bundles\tomcat\bin\startup.bat
  5. Verify the “Tomcat started“ message appears.

    Verify the Tomcat started message appears.

    This indicates that the server has initiated its startup process in the background. Server startup may take a few minutes to complete.

  6. Access your Liferay DXP instance by going to localhost:8080 in your browser.

    Access your Liferay DXP instance.

  7. Sign in using these credentials:

    • Username: admin@clarityvisionsolutions.com
    • Password: learn
  8. Open the Global Menu (Global Menu), go to the Control Panel tab, and click Search.

  9. Go to the Index Actions tab and click Reindex for All Search Indexes.

    Go to the Index Actions tab and click Reindex for All Search Indexes.

  10. When prompted, click Execute to confirm.

  11. Take some time to explore the site and resources included in the training workspace.

NOTE

To shutdown your Liferay server, run this command in your terminal:

Unix-based:

./bundles/tomcat/bin/shutdown.sh

Windows:

.\bundles\tomcat\bin\shutdown.bat

Manual Setup (Optional)

Alternatively, you can set up your course environment manually.

NOTE
This process involves more technical steps. If you’re using a company system, you may need to contact your company's IT support.
  1. Ensure your system satisfies the following prerequisites:

  2. Open your terminal and clone the training workspace to your computer:

    git clone https://github.com/liferay/liferay-course-publishing-tool-and-content-lifecycle

    This saves a copy of the project in your current terminal directory.

    NOTE
    If you’ve cloned the repo previously, ensure your workspace is up to date by running git pull origin main.
  3. Go to the workspace’s root folder in your terminal:

    cd liferay-course-publishing-tool-and-content-lifecycle/
  4. Initialize your Liferay bundle.
    Unix-based:

    ./gradlew initBundle

    Windows:

    .\gradlew.bat initBundle

    This downloads and builds dependencies for running Liferay, including the Liferay Tomcat server.

  5. Follow steps 4-11 of the previous section.

Conclusion

Great! With your environment set up, you’re ready to start contributing to Clarity’s applications. Next, you’ll learn the fundamentals of Liferay’s content lifecycle.

loading-knowledge-label