Run CTP as a service
Run CTP automatically in the background by installing it as a service. Choose your operating system.
The CTP install.bat script uses Apache procrun. Use the following steps to enable CTP as a Windows service, including an update to use a JRE other than system default (leave out step 2 if using the system default JRE)
-
Install CTP
java -jar CTP-installer.jar -
To use JRE other than system default, edit
<ctp-home>/windows/install.bat. Find the--Jvm=auto, add a--JavaHomeentry and set both as follows--JavaHome="<jre home> " ^--Jvm="<jre-home>\bin\server\jvm.dll" ^^is needed to wrap/continue command line in batch file- The jvm.dll location under
<jre-home>is the same for JRE 1.7 and 1.8 installs. Confirm this is the case for other JREs/JDKs
-
Run install.bat as Administrator to create the CTP windows service
cd <ctp-home>/windowsinstall -
Open Windows Services as Administrator and start the CTP service
-
Open CTP administration page in Web browser
-
Confirm the correct JRE is reported in Admin → System Properties and/or Admin → Log Viewer → ctp.log
Troubleshooting
Section titled “Troubleshooting”- Installation paths are set in install.bat during CTP install so it won’t work if you move the CTP folder somewhere else after install
- If removing the service (with uninstall.bat) leaves the service stuck in delete pending state, reboot the system to complete
Further information
Section titled “Further information”-
Open
./linux/ctpService-ubuntu.shand update the following parameters:USER=ubuntuCTP_HOME=/opt/ctp/CTPJAVA_BIN=/usr/lib/jvm/java-17-openjdk-amd64/binJAVA=$JAVA_BIN/javaCTP_PID=$CTP_HOME/ctp.pid -
Install the ctpService into init.d:
sudo ln -s ./linux/ctpService-ubuntu.sh /etc/init.d/ctpServicesudo update-rc.d ctpService defaults 98 02 -
Start and stop CTP using the following commands:
sudo service ctpService startsudo service ctpService stop