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.