Apache - Script to start tomcat server automatic, Auto start tomcat server
Script to start tomcat server automaticThe below script will help you to start tomcat automatically. To make tomcat automatically start when we boot up the computer, you can add a script to make it auto-start and shutdown.
# vi /etc/init.d/tomcatNow paste in the following:
# Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/jvm/java-6-sun case $1 in start) sh /usr/local/tomcat/bin/startup.sh ;; stop) sh /usr/local/tomcat/bin/shutdown.sh ;; restart) sh /usr/local/tomcat/bin/shutdown.sh sh /usr/local/tomcat/bin/startup.sh ;; esac exit 0You'll need to make the script executable by running the chmod command:
# chmod 755 /etc/init.d/tomcat
The last step is to add the script to startup / chkconfig. To make the tomcat to start automatically when the system gets booted.
The topic on Apache - Script to start tomcat server automatic is posted by - Math
Hope you have enjoyed, Apache - Script to start tomcat server automaticThanks for your time