Principle start Linux system

Principle start Linux system

RHEL startup principles
BIOS self-test -MBR- start loading the kernel init process GRUB- of -systemd

systemd initialization process
load services need to mount the file system / etc / fstab
systemd is the first process linux kernel boot, replacing the init

The advantages of systemd:
start fast, providing a snapshot of system services, the service is automatically updated in real time

pstree command to view the process first started, pid is 1
---------------
the init systemd and compare
init0 systemctl poweroff shutdown
init1 systemctl isolate rescue.target single-user mode
init3 systemctl isolate multi-user.target multi-user mode, character-based interface
init5 systemctl isolate.graphical.target graphical interface
init6 systemctl reboot reboot the system

vim / etc / inittab run level system documentation
to see the current default run level
systemctl get-default
to set the default run
systemctl set-default

Call the character-based interface
systemctl isolate multi-user.target
call character interface and the default operating level
systemctl set-default multi-user.target

Switching the operating level
systemctl isolate multi-user.target

Set to guide the grub
vim / etc / default / grub
using the grub2-mkconfig changes to take effect
view the grub configuration file
vim /boot/grub2/grub.cfg

Covering the implementation of
grub2-mkconfig -o /boot/grub2/grub.cfg

The main command systemd is systemctl
systemctl Start service names start a service
systemctl restart the service name to restart a service
systemctl stop service name to stop a service
systemctl status service name to view a service of state
systemctl enable the service name to set up a service at startup
systemctl disable the service name set up a service boot automatically shut down


init5 switch to a graphical interface
-----------------------------
view atd status of the service,
systemctl Status atd

Apache installation package
yum -y install httpd
systemctl enable httpd
ststemctl disable httpd
------------------
view the system is in service of those boot from the start of
systemctl list-unit-files --type service
to view the system resources occupied in the service of the state
systemd-cgtop

Guess you like

Origin www.cnblogs.com/GaoNa/p/11135346.html