Posts

Showing posts from December, 2024

Liferay: Upgrade Steps Audit

Image
  Liferay: Upgrade Steps Audit How to monitor and run repeatedly the Upgrade Steps  Introduction Liferay Upgrade Steps are designed to be run only once in order to perform some changes on the portal: database schema changes, data or configuration updates. But sometimes they can fail, or implementation logic might be not correct, and we might need to run them again after proper adjustments. Also, we need to see the state of each upgrade module to know exactly which upgrade steps were run already, and which ones are still pending.  Audit and Running Upgrades Check Available Upgrade Steps To check pending upgrade steps on the portal - you can run a Gogo Shell command: upgrade:check You should see the list of upgrade steps not executed yet in the output: Note : navigate to Control Panel → Gogo Shell or use the telnet terminal to run Gogo Shell commands.  Inspect a Specific Upgrade Module To inspect a specific module you can use a Groovy Script. Navigate to Control Panel ...

Running Liferay as a Service

  Running Liferay as a Service How to run Liferay as a Service and make it auto-started on system reboot Introduction Sometimes servers hosting Liferay can be restarted. For a higher availability of the Liferay portal we need to make sure that Liferay is also started automatically during the system start. To achieve this - Liferay can be run as a service configured to auto-start. Configuration Define Liferay Service Configuration File To define a service for Liferay - create a liferay.service file inside /usr/lib/systemd/system directory as root user: sudo su  cd /usr/lib/systemd/system touch liferay.service nano liferay.service with the following content: [Unit] Description = Liferay Service After = network.target [Service] Type = forking User = user Group = user Environment = JAVA_HOME=[JAVA_HOME] Environment = CATALINA_PID=[LIFERAY-PATH]/tomcat[-x.x.x]/temp/tomcat.pid Environment = CATALINA_HOME=[LIFERAY-PATH]/tomcat[-x.x.x] Environment = CATALINA_BASE=[LIFERAY-PATH]/tomc...