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
The marquee element can achieve simple font (image...
I encountered a pitfall when writing dynamic form...
nohup command: If you are running a process and y...
Quickly install the tensorflow environment in Doc...
I'm looking for a job!!! Advance preparation:...
One trick for dealing with this type of error is t...
This article introduces the sample code of CSS to...
A problem that front-end developers often encount...
In the previous sections, we discussed aspects of ...
Table of contents Overview Code Implementation Su...
Table of contents 1. What is Function Anti-shake?...
Detailed description of properties The purpose of...
Because the Base images pulled by Docker, such as...
This article records the VMware Workstation 12 Pr...
1 Introduction Kong is not a simple product. The ...