vicker313 tech blog

January 21, 2010

Install Tomcat Startup Script in Linux

Filed under: Tomcat — Tags: , — vicker313 @ 8:00 am

Make Tomcat auto startup in Windows is easy, either install it as service or just put the startup batch into Windows startup list. But not for Linux. After you install (or unzip) Tomcat into your Linux machine, and everything tested OK, you can use steps below to make Tomcat startup as service in Linux (referring to Startup script for Tomcat on Centos | Redhat | Fedora):

  1. Download the startup script from here. There are 2 files inside the zip file: tomcatd and tomcatRunner.
  2. Extract them to /etc/init.d. Make sure they are runnable.
  3. Edit parameters below inside tomcatd file:
    1. JAVA: location of your java utility, for example /usr/java/jdk1.6.0_17/bin/java.
    2. tomcatuser: user that will run the service, usually I just change it to root. (default is tomcat)
    3. CATALINA_HOME: location of your Tomcat, example /usr/tomcat.
  4. Make a tomcat directory in /var/run:
    mkdir /var/run/tomcat
  5. Add the tomcat service:
    chkconfig ––add tomcatd
  6. Now you should able to test out the service:
    service tomcatd restart

Here is another post to auto start Tomcat.

Advertisements

1 Comment »

  1. […] Here is another method to install tomcat startup script in Linux (there is another method in my earlier post) […]

    Pingback by Make Tomcat Auto Start in Linux « vicker313 tech blog — August 12, 2011 @ 7:50 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: