How to restart, stop, start httpd service?

Source: Internet
Author: User
/etc/init.d/xxx Start | Stop | Restart
/ETC/INIT.D/HTTPD Reload
Advantages: No need to find the PID of the process
/ETC/INIT.D/HTTPD restart
Close and reopen
There are many such as RC under the/etc. D's directory, which has many symbolic links. Here,? refers to the running level corresponding to the number and RCSYSINIT.D. In these directories there will be a symbolic link file, whose names begin with a K or S, followed by three digits: 000-999. K means stopping (Kill) a service. s means start (start) a service in which the numbers mark the sequence of operations during startup, and the smaller numbers are executed earlier in the boot process. When Initbiah is converted to another run level, some of the corresponding services are stopped, while others begin.
In fact, all the scripts are in/ETC/INIT.D. They do all the work, and all the symbolic links point to them. A stop (killing) connection and a boot (starting) connection point to the same script under/ETC/INIT.D. This is because the scripts can be invoked with different parameters (such as stopping-stop, starting-start, overloading the-reload, displaying the current state-status), using the Stop parameter when a K connection is used, and using the Start parameter when the S connection is used.
There is one exception. The S link in the RC0.D and RC6.D directories does not start any service. They are invoked with the stop argument to stop certain services. The logic behind this is that when you're ready to shut down or reboot, you don't want to start any service, just stop them.
The following are the parameters of the script:
Start: Begin service.
Stop: Service is stopped.
Restart: Stop first and then start the service.
Reload: The configuration of the service has been updated. Use this parameter if the service does not need to be restarted after changing the service's configuration file.
Status: Tells the user, whether this service is running, if it is running, also will give the PID.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.