Set Tomcat auto-start in Linux

Source: Internet
Author: User

1. Environment

Red Hat Enterprise Linux es Release 4
Tomcat5.5
Jdk1.6

 

2. Setup steps (root user login)

1) copy/tomcat_home/bin/Catalina. Sh to/etc/rc. d/init. d.

In/etc/rc. d/init. d/Catalina. Sh

#! /Bin/sh
#-----------------------------------------------------------------------------

Add

# Chkconfig: 2345 63 37
# Description: Tomcat server init script
Java_home =/usr/local/jdk1.6.0 _ 16 (JDK installation directory)
Catalina_home =/usr/local/tomcat5.5 (tomcat installation directory)

 

2) Rename/etc/rc. d/init. d/Catalina. Sh to Tomcat

 

3) check whether all files under/tomcat_home/bin have the execution permission. If not, change the Shell Permission to executable.

$ Chmod 755 *.*

 

4) Check whether/etc/rc. d/init. d/tomcat has the execution permission. If you have no permission, run the following command to modify the permission:

$ Chomd 755 Tomcat

 

5) Execution

$/Sbin/chkconfig -- add Tomcat

$/Sbin/chkconfig -- level 35 Tomcat on

 

6) Check whether Tomcat exists in the system service.

$/Sbin/chkconfig -- list | grep Tomcat

 

7) restart the machine and run the following command to check whether Tomcat is started.

$ PS-Ef | grep Tomcat

 

3. You can also view Tomcat startup information in/var/log/boot. log.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.