Last active
August 29, 2015 14:22
-
-
Save mortenbra/03bd91afed91415df393 to your computer and use it in GitHub Desktop.
Setup Tomcat service script to start at boot time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes you have created a service script at /etc/init.d/tomcat | |
cd /etc/init.d/ | |
# make the script executable | |
chmod 755 tomcat | |
# set to start at boot time | |
chkconfig --add tomcat | |
chkconfig --level 234 tomcat on | |
# verify it | |
chkconfig --list tomcat | |
# start tomcat | |
service tomcat start | |
# note: this gave error "Cannot find /usr/share/tomcat7/latest/bin/catalina.sh | |
# The file is absent or does not have execute permission" | |
# see http://louis-sawtell.com/content/tomcat-cannot-find-bincatalinash | |
cd /usr/share/tomcat7/latest/bin | |
chmod +x *.sh | |
chmod +x *.jar | |
# stop tomcat | |
service tomcat stop | |
# restart tomcat | |
service tomcat restart | |
# check logfile and look for any errors | |
cat /usr/share/tomcat7/latest/logs/catalina.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment