How can I restart, end, and start the httpd service?
Source: Internet
Author: User
When a K connection is applied, the Stop parameter is applied accordingly; when the S connection is applied, the Start parameter is applied accordingly. There is one exception. The slink in the rc0.d and rc6.d directories will not start any service. They are called with the stop parameter to end some services. The logic behind this is that when you are about to shut down or restart, you don't want to start any services, but stop them. /Etc/init. d/*** start | stop | restart
/Etc/init. d/httpd reload
Strength: You do not need to find the PID of the process
/Etc/init. d/httpd restart
Close and re-open
In/etc, there are many such as rc ?. D directory, which contains many symbolic links. Here ,? It refers to the number corresponding to the running level and rcsysinit. d. These directories contain symbolic link files whose names start with K or S, followed by three numbers: 000-999. K means Kill a service. S means that the Start service is a service, and the number indicates the running order during the startup process. The smaller the number, the earlier the startup process. When initbiah is switched to another running level, some corresponding services will be terminated, while other services will begin.
In fact, all scripts are in/etc/init. d. They have completed all the work, and all symbolic links point to them. The killing connection and starting connection point to the same script in/etc/init. d. This is because different parameters (such as end-Stop, Start-Start, Reload, and current Status-Status) can be applied when these scripts are called. when a K connection is applied, apply the Stop parameter accordingly. when the S connection is applied, apply the Start parameter accordingly.
There is one exception. The slink in the rc0.d and rc6.d directories will not start any service. They are called with the stop parameter to end some services. The logic behind this is that when you are about to shut down or restart, you don't want to start any services, but stop them.
The following are the script parameters:
Start: start the service.
Stop: end the service.
Restart: end first, and then start the service.
Reload: The service configuration is updated. After changing the service configuration file, use this parameter if the service does not need to be restarted.
Status: indicates whether the service is running. if the service is running, a PID is provided.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.