CentOS7 boot process and service management

A: Overview of the boot process:
<br/>

1. POST
after boot server host, will be based on the motherboard BIOS settings for CPU, memory, video card, keyboard and other equipment preliminary testing, testing has been successfully handed over control of the system according to the preset startup sequence, most of the time will be handed over to the machine hard disk.
2. MBR boot
when the boot from the local hard drive of the system, first (Master Boot Record master boot record) according to the first sector of the hard disk is provided in the MBR, the system passes control to the operating system partition contains boot files; root or directly MBR boot record information call the boot menu.
3. GRUB menu
For Linux operating systems, GRUB (GRand Unified Bootloader, unified boot loader) is the most widely used multi-system boot program. After the transfer system control to GRUB, the boot menu will be displayed to the user selected, and depending on the option to load the Linux kernel files, then the system control to the kernel. (CentOS 7 uses GRUB2 bootloader).
4. Load the kernel
Linux kernel is a special pre-compiled binary files between various hardware resources and system programs, responsible for resource allocation and scheduling. After the kernel took control of the system, we will have complete control over the entire process of running the Linux operating system.
5. init initialization process
in order to complete further system boot process, Linux kernel first Loading System "/ sbin / init" program into memory to run, init process is responsible for the completion of a series of system initialization process, waits for the user to log the last
two init process
by the Linux kernel is loaded run / sbin / init program
is the first system in the process
PID (process mark) is always No. 1

three. systemd management system
in CentOS system, various system control script placed in the service of the default / usr / lib / systemd directory. Systemctl command tool can be achieved by control of the specified system services.

1. Check the service startup state
Syntax: systemctl status name.service
view sshd status (active running state)
CentOS7 boot process and service management

2 Start and stop the service
Syntax: systemctl {star | stop | restart | reload} name.service}

3. Set the boot
Syntax: systemctl {enable | disable} name.service

View the status of the service set
syntax: systemctl list-unit-files --type service
CentOS7 boot process and service management

Guess you like

Origin blog.51cto.com/14449563/2432366