Jahia 7.x as a Windows service
Question
How to install Jahia 7.x as a Windows service?Answer
Start by downloading the proper binary distribution of Tomcat 8 for your Windows platform (https://tomcat.apache.org/download-80.cgi )
- Windows 32bit: 32-bit Windows zip (pgp, md5, sha1)
- Windows 64bit: 64-bit Windows zip (pgp, md5, sha1)
Then install and configure it as a Windows service as described in https://tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html
- In the paragraph "Installing services", you can run the script service.bat
- In the Apache Tomcat distribution :
cd [Your Apache Tomcat Distribution]/bin service.bat install
- The following service is installed: Apache Tomcat8.0 Tomcat8
Finally install Jahia into an existing Tomcat installation, following the steps of https://academy.jahia.com/documentation/digital-experience-manager/7.1/technical/configuration-and-fine-tuning/installation#Application_server_specific_installations
When running the Tomcat as Windows service, the JVM options from tomcat/bin/setenv.bat
, are not taken into consideration and have to be added into "++JvmOptions
" service parameter.
You can also use the tomcat8w, the GUI application to set these JVM options.
If so, you have to set Initial memory pool to 2048m and Maximum Memory pool to 4096m, otherwise, the Jahia service will not start.
In case you are facing this error: org.jahia.services.templates.ModuleBuildHelper: Cannot set maven executable to mvn
, please check your configuration
- Open the
jahia.properties
file underDigitalExperienceManager-EnterpriseDistribution-7.1.2.0/D/digital-factory-config/jahia
- Search the string: mvnPath
- You should find this setting:
#mvnPath = mvn
- Change the setting to:
mvnPath = mvn.cmd
- Save the change
- Double-check that the mvn.cmd script exists under your Apache Maven installation:
C:\Program Files\apache-maven-3.3.9\bin
(for instance). Otherwise, you have to create it by duplication the mvn.bat
and to rename the duplication tomvn.cmd
- Stop and restart the service
If the issue persists, this is likely possible that the Tomcat 8 service was started with the System account.
To change to the user account:
- Access to the Windows service panel.
- Right-click on your tomcat 8 service.
- Select "Properties".
- Select "Connection" tab.
- Select the user account and enter your Windows username and password.
- Stop and restart the service.