Posts tagged How to Create Tomcat Service Daemon in CPanel Server

How to Create Tomcat Service Daemon in CPanel Server

If you want to create a  Service Daemon for Tomcat  then follow the below steps 😕

[email protected][#] vi /etc/rc.d/init.d/tomcat

Add the below code

#!/bin/sh

JAVA_HOME=/usr/local/jdk; export JAVA_HOME

TOMCAT_HOME=/usr/local/jakarta/tomcat; export TOMCAT_HOME

$TOMCAT_HOME/bin/catalina.sh $*

Then

[email protected][#] chmod 755 /etc/rc.d/init.d/tomcat

That’s all now you can start and stop tomcat as :

To Start Tomcat :

[email protected][#] /etc/init.d/tomcat start

To Stop Tomcat :

[email protected][#] /etc/init.d/tomcat stop

That’s all you are done.