Adding Apache httpd services to system services in CentOS

Source: Internet
Author: User

If there is no httpd service, every start must/usr/local/apache/bin/apachectl start very uncomfortable to say,

The httpd is loaded into the service below, and the same can be done with other services.

CD/ETC/INIT.D//Switch to this directory to see what system services are checked httpd is not a system service

Steps to add the Apache service to the system service

Apache joins the system service:
CP/installation directory under/APACHE/BIN/APACHECTL/ETC/RC.D/INIT.D/HTTPD

Second step run Chkconfig--list see if there is Apache service

If not, use the

2. There is no httpd in the Run Chkconfig–list Discovery list, added by Chkconfig–add httpd, may prompt httpd service does not support Chkconfig, need to edit/etc/rc.d/init.d/httpd

add the following note information:

# chkconfig: 345 85 15# description: activates/deactivates apache web  server345 represents which Linux levels need to be started httpd,  boot sequence number is 85,  close sequence number is 

3. Running CHKCONFIG–LIST,HTTPD exists, you can start and stop the service by using service httpd start and service httpd stop.


Adding Apache httpd services to system services in CentOS

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.