/
Create Tomcat service manually
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Create Tomcat service manually

Please follow the below steps to set Tomcat as service:

  1. Go to ${TOMCAT_HOME}/bin
  2. Open 'openspecimen' file in edit mode. Please use openspecimen file if not present in the folder
  3. Search for 'CATALINA_HOME'
  4. Set the 'CATALINA_HOME' to your tomcat home. The value of this variable will be same as ${TOMCAT_HOME}
  5. The service will be created with the name of the filename. (i.e openspecimen). If you wish to change the service name, rename the file name you want. Also, change the service name in the file as well which are used in printing messages.
  6. Copy the file and paste it into /etc/init.d
  7. Stop the tomcat
  8. Go to ${TOMCAT_HOME}/bin
  9. Run the command: sudo ./os_service_install.sh This will install the service and start the tomcat

Set the service to start on reboot

  1. sudo /sbin/chkconfig --list <service_name>
    Ex: sudo /sbin/chkconfig --list openspecimen
    If nothing lists then run the below command otherwise directly run #3.
  2. sudo /sbin/chkconfig --add <service_name>
  3. sudo /sbin/chkconfig <service_name> on
  4. sudo chkconfig --level 6 <service_name> on

Related content

How to run Tomcat as a service
How to run Tomcat as a service
More like this
How to fix "out of memory" error ?
How to fix "out of memory" error ?
More like this
How to run Tomcat using PID on Linux?
How to run Tomcat using PID on Linux?
More like this
Common Deployment Issues
Common Deployment Issues
Read with this
How to upgrade Tomcat?
How to upgrade Tomcat?
More like this
How to start/stop OpenSpecimen?
How to start/stop OpenSpecimen?
More like this
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com