Configuring Alfresco as a Windows Service

From AlfrescoWiki

Jump to: navigation, search


They are written in the context of an standard Alfresco/Tomcat installation (version 1.4 and beyond). Make any appropriate adjustments for J-Boss or other application servers.

With the default installation, Alfresco is bundled as a web application that launches within Tomcat. Thus, to set up Alfresco to run as a Windows Service, you simply need to set up Tomcat to run as a Windows service.

You may wish to consult the Apache Tomcat Website to learn more about Tomcat and the various options that it will support. In particular, they provide a really good Windows service How-To document.

These installation instructions work for Alfresco as downloaded from the Alfresco community branch (and pre-bundled with the JDK). The JDK must be version 1.5_08 or greater. If you have an earlier version, you will need to update your JDK to a more recent version.

[edit] Installation

  • Use the following commands to install Alfresco as a Windows Service

(Assume Alfresco installed at c:\alfresco)

cd c:\alfresco\tomcat\bin
service.bat install alfresco
tomcat5.exe //US//alfresco --DisplayName "Alfresco Server"
tomcat5.exe //US//alfresco --JvmMs=256 --JvmMx=512 --JvmSs=64
tomcat5.exe //US//alfresco --JavaHome=c:/alfresco/java
  ===>  I think it should be tomcat5.exe //US//alfresco --JavaHome=c:/Program Files/java
         Because the latest full bundle installs java under program files....
tomcat5.exe //US//alfresco --Environment ALF_HOME=c:/alfresco/
tomcat5.exe //US//alfresco --Environment PATH=c:/alfresco/bin;%PATH%
tomcat5.exe //US//alfresco --StartPath c:/alfresco --Startup auto
  • To uninstall the service, at a later time, do the following:

(Assume Alfresco installed at c:\alfresco)

cd c:\alfresco\tomcat\bin
service.bat uninstall alfresco
  • To edit your service settings at any time:

(Assume Alfresco installed at c:\alfresco)

cd c:\alfresco\tomcat\bin
tomcat5w.exe //ES//alfresco

Finally, to start the service, just go into your Windows Service control panel and locate the service that is now named 'Alfresco Server'. You can start and stop Alfresco from this control panel.