The tomcat startup Item is added for linux Startup.

Source: Internet
Author: User

The tomcat startup Item is added for linux Startup.

Requirement: After the development environment (linux) is restarted, It is cumbersome to manually start related applications each time. If it is set to enable automatic startup, this workload can be reduced.

Under google, the following blog posts help solve the problem:

1. Introduction to setting the Automatic startup command for a program in Centos2. Details on how to enable the Startup Program in Linux

There are two ways to solve this problem:

  • 1. Add a Startup Program to serve the system

For example, the common mysqld, smb, and ftp services are implemented through this method. You can use the chkconfig command to add the script to the system service. For details about how to use the chkconfig command, refer to the linux help documentation. The main methods include:

Chkconfig mysqld on/off/

  • 2. the Startup Program is a common sh command.

Directly modify/etc/rc. d/rc. local and add the corresponding command. This method is simple and uses this method. For example:

#! /Bin/sh # This script will be executed * after * all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. # dev service setup (nginx, lms, tomcat ...) -- add by bryant 2015-2-27/usr/local/nginx/sbin/nginx/home/bo/war_project/tomcat/bin/startup. sh/home/ovp/war_project/tomcat/bin/startup. sh/home/client/war_project/tomcat/bin/startup. sh/home/ovp/jar_project/drm-router/drm-router.sh start/home/ovp/jar_project/transCenter/startup. sh/lms/bin // start-lmsView Code

Supplement:

[Root @ streamserver rc. d] # chkconfig -- list mysqld
Mysqld 0: off1: off2: on3: on4: on5: on6: off

The displayed results are divided into 7 groups: 0-6, which involves the linux operating system startup principle knowledge. This article does not research for the time being.

 

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.