How to set tomcat auto start

Dear Community,

After installing DHIS2 Server, i would like that tomcat to start automatically and restart when the instance goes down. Can someone has an idea on how to do this


Starting DHIS2 at server startup
Create init scripts:
sudo nano tomcat

Enter the following lines:

#Tomcat init script


case $1 in
sudo -u dhis ${HOME}/
sudo -u dhis ${HOME}/
sudo -u dhis ${HOME}/
sleep 5
sudo -u dhis ${HOME}/
exit 0

Move the script to the init script directory and make it executable by invoking:
sudo mv tomcat /etc/init.d
sudo chmod +x /etc/init.d/tomcat

Next, make sure the tomcat init script will be invoked during system startup and shutdown:
sudo /usr/sbin/update-rc.d -f tomcat defaults 81

Check this link for more details DHIS2: District Health Information System

Hi, @Kenyuri
I have installed DHIS2 2.34.4 on a Windows server operating system.
How to make Tomcat automatically startup?
Thank you

You can follow the link to auto start applications in windows.refer the link Change which apps run automatically at startup in Windows 10 .Place your location /bin/startup.bat


Thank you for your support