I installed Tomcat7 from source on a debain. However, based on the information online I should be able to start and stop the service using the following command:
service tomcat7 stop/start
However when I run this, I get this error:
tomcat7: unrecognized service
Can anyone tell me please how I can make it so Tomcat can be stopped and started.
Best Answer
You've installed Tomcat from source, and the Tomcat source package does not provide a service script for Debian. Tomcat works on a number of platforms and rather than trying to maintain the appropriate service startup configuration for Debian/RedHat/Solaris/AIX/Mac OS/Windows, they leave that up to the people who develop packages for your particular OS and distribution.
If Tomcat 7 is already packaged for Debian, your best bet is simply using the available package rather than building your own.
Alternatively, you can obtain the necessary files from the Debian package to use with your source-installed Tomcat.