None of the content is original, so don't waste your time reading this blog.

Tuesday, March 20, 2007

Tomcat as service

Simple steps to setup Tomcat as service on Redhat:
  1. put this script on /etc/init.d/
  2. edit it, so that the variables JAVA_HOME and TOMCAT_HOME are pointing to correct locations on your system, for instance the script is setted with:
    TOMCAT_HOME=/opt/tomcat
    JAVA_HOME=/usr/java/jdk1.5.0_09
  3. set execution permision to the script:
    # chmod a+x /etc/init.d/tomcat
  4. add a tomcat user, if there is no one already
    # adduser tomcat
  5. make tomcat user the owner of TOMCAT_HOME directory, for instance
    # chown -R tomcat:tomcat /opt/tomcat/
  6. finally, install the script as service
    # chkconfig --add tomcat
now it is easier to manage tomcat with the comands:
# service tomcat [start|status|stop]
Source: http://www.spaceprogram.com/knowledge/2004/01/starting-tomcat-as-service-on-linux.html

Labels:

0 Comments:

Post a Comment

<< Home