Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Chapter II guidance and Service Management-centos7.5 knowledge

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Boot the startup process

MBR:master boot record

Ps-ef

Centos7 previously started the Init process

/ sbin/init program is loaded and run by the Linux kernel

Is the first process in the system

The PID (process tag) number is always 1

Start the systemd process after Centos7

Systemed unit type

Unit type

Extension name

Description

Service

.service

Describe a system service

Socket

.socket

A socket that describes interprocess communication

Device

.device

Describe a kernel-recognized device file

Mount

.mount

Describe the mount point of a file system

Automount

.automount

Describe the automatic mount point of a file system

Swap

.swap

Describe a memory swapping device or swap file

Path

.path

Describe a file or directory in a file system

Timer

.timer

Describes a timer (used to implement cron-like scheduling tasks)

Snapshot

.snapshot

Used to save the state of an systemd

Scope

.scope

Create external processes programmatically using the bus interface of systemd

Slice

.slice

Describe a group of management system processes that are hierarchically organized in Cgroup

Target

.target

Describe the units of a set of systemd

Systemd target corresponding to run level

Operation level

Target of Systemd

Description

0

Poweroff.target

Shutdown status, when using this level, the host will be shut down

one

Rescue.target

Single-user mode, which can log in to the system without password authentication, which is mostly used for system maintenance.

two

Multi-user.target

User-defined / domain-specific run level. The default is equivalent to 3

three

Multi-user.target

The complete multi-user mode of the character interface, at which most server hosts run

four

Multi-user.target

User-defined / domain-specific run level. The default is equivalent to 3

five

Graphical.target

The multi-user mode of graphical interface provides a graphical desktop operating environment.

six

Reboot.target

Restart, the host will be rebooted when using this level

Change the running level

Systemctl get-default

Systemctl set-default multi-user.target

Systemctl get-default

Or

Runlevel

Init 0-6

Centos7 system service control

Common ways

Systemctl

Control type

Start: start

Stop: stop

Restart: restart

Reload: reloading

Status: viewing service statu

……

Systemctl status rsyslog.service

Systemctl restart rsyslog.service

Management service startup

Ntsysv tool

Provide an interactive, visual window

It can be run on the character terminal.

Facilitates centralized management of multiple servic

Systemctl tool

Interactive, visual windows are not available

More efficient in managing individual servic

Ntsysv uses graphical interface to set service start and stop

Ntsysv-- level level list sets the level specified when the service is started or stopped

Systemctl is-enabled service name check whether the specified service is set to permanent startup state (enable permanent startup, disable does not permanently start)

Systemct list-units-- type=service to view the status of all services that are set to start automatically

Systemctl-all to view the status of all services

Systemctl enable service name (permanent setting startup)

Systemctl disable service name (permanent setting does not start)

Systemctl start service name

Systemctl stop service name

Compare with older versions (for versions prior to 7)

View Service chkconfig-list

View service status service service name status

Start the service: service service name start

Stop service: service service name stop

Service permanent Settings

Chkconfig service name on

Chkconfig service name off

Assignment:

1. Check whether the service rsyslog status is set to permanent startup, and set to permanent startup.

2. Set the system service firewalld to permanently do not start, and close selinux.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report