As of version 3, the Tanuki Service Wrapper is no longer included with dotCMS. This allows users to use their own preferred service wrapper more easily.
One example of a Java service wrapper for windows is “Yet Another Java Service Wrapper”, or YAJSW for short. It is an open source project, supports 64 bit java out of the box, and requires no additional costs or licensing fees to use it.
Steps to Install dotCMS Windows Service Using YAJSW
- Download the service wrapper (from http://sourceforge.net/projects/yajsw/files/).
- Unpack the archive to a folder (e.g. yajsw).
- Start dotCMS normally and query the port tomcat is running on to get the pid.
netstat -aon | findstr "<tomcat_port>"
- In the above command, the PID is in the rightmost column.
- In your yajsw/bat subfolder, execute
genConfig.bat <pid>
- This will generate a default config file based upon the current running parameters of dotCMS.
- Edit the generated configuration in conf/wrapper.conf:
- Change the following values to show the name as dotCMS rather than yajsw
wrapper.ntservice.name=dotCMS wrapper.ntservice.displayName=dotCMS wrapper.ntservice.description=dotCMS Server
- If necessary (depending on your configuration), update the values of
wrapper.app.password
andwrapper.app.account
. - If desired, suppress error messages: Some messages are expected during the run of the system and by default the wrapper is configured to send those messages as a notification on screen. You should be able to monitor error messages on the server log files. If you wish to suppress these messages then comment out these lines:
wrapper.filter.trigger.0=Exception wrapper.filter.script.0=scripts\/trayMessage.gv wrapper.filter.script.0.args=Exception
- Change the location of the wrapper working directory to the Tomcat root folder:
wrapper.working.dir=c:\dotcms\dotserver\tomcat-8.0.18\
- Change the following values to show the name as dotCMS rather than yajsw
- Test your wrapped application as a console application by calling
runConsole.bat
. - Check that dotCMS is running by logging in to the system.
- You should get a message on the your desktop as a bubble notification stating that the service is running.
- Stop dotCMS by clicking on the wrapper icon.
- Run the
installService.bat
.
At this point dotCMS should appear as part of the Windows services in the Service Management Window. The service may be stopped and started using startService.bat
and stopService.bat
.
For more information on YAJSW, please see the following: