16.1 Introduction
Service is the essence of the process, but is running in the background, usually listen to a port, waiting for other programs, such as (mysql,sshd, firewalls, etc.), so we are called daemons, is a very important knowledge point in Linux.
16.2 Service Management directives:
Service Name Start|stop|restart|reload|status
No service is used after Centos7.0, but Systemctl
16.3 Use Cases
(1) View the status of the current firewall, turn off the firewall and restart the firewall.
(2) When the firewall is turned off or enabled, it takes effect immediately. Telnet tests a port.
The WIN10 system turns off the Telnet client by default, and we just need to enable this Windows feature.
(3) This is only a temporary effect, when the system is restarted, but also to return to the previous set of services.
If you want to set a service to start or close permanently, use the CHKCONFIG directive
16.4 View service Name
Mode 1: You can see it by using setup and then selecting System Services.
Mode 2:/etc/init.d/Service Name
16.5 operating level of the service
There are 7 operating levels for Linux systems: 3 and 5 are commonly used.
The process description of the boot:
16.6 chkconfig directive
Description: The Chkconfig command allows you to set the individual run levels of each service from startup, shutdown
(1) View service
(2) Chkconfig--level 5 service name on/off
Shuts down the SSHD service at run Level 5 and then starts
Usage Details: Chkconfig After the service has been restarted or shut down, it will need to restart the machine reboot to take effect.
Linux (16) service Management