"LINUX"--service management

Source: Internet
Author: User

I. Classification of SERVICES

1. Binary Package

(1), quickly install, uninstall, upgrade and manage software

(2), simple installation, fast speed

(3), through encapsulation, can not directly obtain the source code

(4), function selection is poor, function customization is not flexible

2. SOURCE Package

(1), get the latest software version, fix the bug in time

(2), according to user needs, flexible customization of software functions

Second, the RPM Package service management

RPM packages have specific management commands for the software installed, and there are two ways to manage them:

1. Independent Service:

The so-called independent start, that is, you can manage the startup, and other software startup or not, not dependent on other software startup, such software when called to respond directly, processing requests faster. At present, most of the services in Linux are independent services.

To start manually:

(1), start script start,/etc/init.d/a service script file

/ETC/INIT.D/HTTPD start

(2), service management tools

Service httpd Start | Stop | Restart

Self-booting:

(1), using Chkconfig Service self-start tool management

To view the self-booting of the software:

Chkconfig–list | grep Service Name

To set a self-boot for a service:

Chkconfig [--level level] [standalone service name] [on | off]

(2), using the Ntsysv tool to set up the self-starter software

NETSYSV--level level #设置某级别下软件是否自启动

F1: Displays description information for the service

XINETD-Based services:

This kind of service cannot start independently, must rely on a management service to start or shut down, this management service is our XINETD service, this service is the Super daemon of Linux, it is specially used to manage those services that cannot be started by themselves, when the client requests the service to start, The request will be accepted by the XINETD service first, then xinetd to wake up the corresponding service and hit the purpose of initiating a service. This type of service will not always be open, only when the XINETD service receives the request to wake up the corresponding service, after processing service shutdown, which greatly saves the resources of the server, but the corresponding software response speed is not independent service response fast.

-telnet based on the XINETD service

Here we use the Telnet service to lift chestnuts! Telnet is a remote administration command, but because the transfer process is clear, so ... We do not choose him, we use the more secure ssh,telnet port is 23, we are using xinetd to start our telnet.

(1), manually start a service in the XINETD

Vim/etc/xinetd.d/telnet

Here we only need to change disable = Yes to No!

Then restart the XINETD service (note that we are now using xinetd to manage Telnet)

(2), set up the service in xinetd from start

Also with the help of Chkconfig and NTSYSV to achieve self-priming, but this place we need to note is that we do not set a specific service for the self-boot, but set the xinetd self-boot.

"LINUX"--service management

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.