Linux launch and control service process

xiaoxiao2021-03-06  81

1, BIOS self-test

2, run the system kernel and detect hardware

3, the first process of running the system init

4, init reading system boot configuration file / etc / initTab in initialization

l /etc/rc.d/rc.sysinit ------ System Initialization script

l /etc/rc.d/rcx.d/[KS]*----- Configure the service according to the run level

l /etc/rc.d/rc.local ------- Perform local special configuration

l Others -------- special services at different runs

/ * Guarding process * /

//concept

Usually the service providing service on the Linux system is performed by the daemon (daemon) running in the background. These programs are called "service" in the Windows system.

The job of the daemon is a port that opens and waits for access.

//Operation mode

1, the independent process is running

l Managed by the init script

l Script is stored in /etc/init.d/ directory

l All system services are run independently.

2, running by the network daemon service

l Start by xinetd

l There is /etc/xinetd.d/ directory by the profile of the daemon manager management.

l Default xinetd configuration file is /etc/xinetd.conf

l xinetd itself is a daemon of independent operation

/ / View process tree

# pstree

/etc/xinetd.conf file

#

# Simple Configuration File for Xinetd

#

# Some deflults, and include /etc/xinetd.d/

Defaults // Default value for all services

{

/ / Run the maximum number of processes at the same time

INSTANCES = 60

/ / Specify the service registration using Syslogd

LOG_TYPE = SYSLOG Authpriv

/ / Specify the PID of the client mechanism IP and process when you specify

Log_on_success = host pid

LOG_ON_FAILURE = Host

CPS = 25 30

}

INCLUDIR / Etc/xinetd.d

/etc/xinetd.d/telnet

# Default: ON

# Description: The Telnet Server Serves Telnet sessions; IT Uses /

# Unencrypted Username / Password Pairs for Authentication.

Service telnet

{

/ / Indicates that this service is not allowed

Disable = yes

/ / TCP / IP Socket can be reused when interrupting or restarting xinetd

Flags = Reuse

// use TCP Socket Type

Socket_type = stream

/ / For NO, indicating that multi-threaded function

Wait = NO

/ / Indicates the UID of the setting process

User = root

// Operation path of the service

Server = /usr/sbin/in.telnetd

// Add the failure of the UID to the system registration form

LOG_ON_FAILURE = UserID

}

// Startup Process Tools

# NTSYSV

# chkconfig -list [server-name]

# chkconfig -Add Server-Name

# chkconfig -del server-name # chkconfig [-LEVEL Levels] Server-Name

# chkconfig [-LEVELS] Server-name If there is any problem, please send an email: Webmaster@bcxy.com

转载请注明原文地址:https://www.9cbs.com/read-107558.html

New Post(0)