1.service command The service command actually goes to the /etc/init.d directory to execute related programs # The service command starts the redis script service redis start # Start the redis script directly /etc/init.d/redis start # Startup update-rc.d redis defaults We need to write the script ourselves 2.systemctl command systemd is the latest initialization system (init) of the Linux system. Its function is to increase the system startup speed, start as few processes as possible, and start as many processes concurrently as possible. The process management command corresponding to systemd is systemctl 1) The systemctl command is compatible with service That is, systemctl will also go to the /etc/init.d directory to view and execute related programs systemctl redis start systemctl redis stop # Systemctl enable redis 2) The systemctl command manages systemd's resource units The systemd unit is placed in the directory / There are four main types of files: mount, service, target, and want. .mount File The .mount file defines a mount point. The configuration of the What, Where, and Type data items in the [Mount] node is equivalent to the following command: mount -t hugetlbfs /dev/hugepages hugetlbfs .service file The .service file defines a service, which is divided into three sections: [Unit], [Service], and [Install]
.target file .target defines some basic components for .service files to call .wants File The .wants file defines the set of files to be executed. Each time it is executed, the files in the .wants folder will be executed. Summarize The above is the two Linux service management methods service and systemctl introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Realize super cool water light effect based on canvas
>>: Mybatis mysql delete in operation can only delete the first data method
yum or rpm? The yum installation method is very c...
A vector wave <svg viewBox="0 0 560 20&qu...
1. Open the CentOS 7 virtual machine. 2. Log in t...
Cooper talked about the user's visual path, w...
When we write code, we often need to know the dif...
Table of contents 01 Scenario Analysis 02 Operati...
This article uses an example to describe how MySQ...
In tomcat, jsp is not garbled, but html Chinese i...
This tutorial explains how to verify the IP addre...
Convert code to image using html2canvas is a very...
--1. Create a new group and user for mysql # user...
This article mainly summarizes some commonly used...
Reflections on the two viewpoints of “people-orie...
1. Introduction Earlier we introduced the rapid d...
As usual, today I will talk about a very practica...