I'm new to Linux but having spent a whole day I Installed Java and Tomcat. My goal is to host an App with this Linux box. I know it all works fine from my windows based machine, but it is my laptop so I'm planning to use the Linux Box as my dedicated server.

I am following this tutorial . From this tutorial I have executed the following command :

cd /etc/init.d 
vi tomcat 
# description: Tomcat Start Stop Restart  
# processname: tomcat  
# chkconfig: 234 20 80  
export JAVA_HOME  
export PATH  

case $1 in  
sh $CATALINA_HOME/bin/startup.sh  
sh $CATALINA_HOME/bin/shutdown.sh  
sh $CATALINA_HOME/bin/shutdown.sh  
sh $CATALINA_HOME/bin/startup.sh  
exit 0  
chmod 755 tomcat
chkconfig --add tomcat 
chkconfig --level 234 tomcat on 
chkconfig --list tomcat 
service tomcat start  

After this command , tomcat is started at port 8082 . But when I restart pc , the tomcat is not started with boot of PC .

How can I do this ?


Run the following command to set the service to start automatically:

chkconfig tomcat on
  • Note: Forwarding request to 'systemctl enable tomcat.service'. Failed to issue method call: Bad message – Sagor Feb 20 '17 at 12:10
  • Why do you install it like that and not through yum? check out this article: digitalocean.com/community/tutorials/… – Itai Ganot Feb 20 '17 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.