1, the system starts the process review:
Post (power-on self-test, mainly used to check whether the hardware environment that supports system startup is satisfied)---> bootseqence (to load the corresponding boot item device according to the boot order set in the BIOS)---> Bootloader (Load bootloader According to the MBR of the boot device)---> Kernel (load kernel to memory)---> rootfs (Root toggle)---> init (/sbin/init)
Different system init programs are not the same:
CENTOS5:SYSV init//v for version number, Fifth edition
Centos6:upstart
Centos7:systemd
2, Systemd new features introduced:
Implementation of service parallel boot at System boot
Activate processes on demand: this means that processes are activated only when this process is required to run
Support for System State snapshots
The service control logic that is defined based on the dependency relationship.
3. SYSTEMD Core Concept: unit
The unit is identified and configured by its associated configuration file, which mainly contains: system services, listening sockets, saved snapshots, and other unit-related information, which are mainly stored in/usr/lib/systemd/system and/etc/ systemd/system/, as well as the/run/systemd/system/directory.
Common Types of unit:
Unit type |
File name extension |
Use |
Note |
Service Unit |
. Service |
Defining System Services |
|
Taget Unit
|
. Target |
For simulating the run level of INIT implementation |
|
Device Unit |
. device |
Devices used to define kernel recognition |
|
Mount Unit |
. Mount |
Used to define file system mount points |
|
Scoket Unit
|
. scoket |
Socket file used to identify inter-process communication |
|
Snapshot unit
|
. snapshot |
For managing system Snapshots |
|
Swap Unit
|
. Swap |
Used to identify swap devices |
|
AutoMount Unit
|
. automount
|
File System auto mount point settings |
|
Path unit
|
. path |
Used to define a file or directory in the file system. |
|
4. Key Features of SYSTEMD:
Socket-based activation mechanism, socket and program separation
Bus-based activation mechanism
Device-based activation mechanism
Mechanism of activation of path
System snapshot: Saves the current state information for each unit in a persistent storage device
Backward compatible SYSV init script: Scripts stored in the/etc/init.d/directory
5. Systemd Incompatible Features: (some features incompatible with the old version)
The SYSTEMCTL command is fixed at the same time.
A service that is not initiated by SYSTEMD Systemctl cannot communicate with it, that is, Systemctl cannot control the service.
15.2, SYSTEMD Daemon Process Introduction