How to add httpd service in RedHat

Source: Internet
Author: User
RedHat: Add httpd service method cp/usr/local/apache2/bin/apachectl/etc/rc. d/init. d/httpd added the httpd service vi/etc/rc. d/init. d/httpd: Add # chkconfig:-2nd # description: ApacheisaWorldWideWebserver in row 8515. I

How to add httpd service in RedHat

Cp/usr/local/apache2/bin/apachectl/etc/rc. d/init. d/httpd add httpd service

Vi/etc/rc. d/init. d/httpd

Add in row 2nd

# Chkconfig:-85 15

# Description: Apache is a World Wide Web server. It is used to serve \

# HTML files and CGI.

1. Add the httpd service:

[Root @ localhost ~] # Chkconfig -- add httpd

2. view the httpd service:

[Root @ localhost ~] # Chkconfig -- list | grep httpd

Httpd 0: Close 1: Close 2: Close 3: Close 4: Close 5: Close 6: Close

3. Run the httpd service automatically at startup:

[Root @ localhost ~] # Chkconfig -- level 345 httpd on

4. view the httpd service status:

[Root @ localhost ~] # Chkconfig -- list | grep httpd

Httpd 0: Disable 1: Disable 2: Disable 3: Enable 4: Enable 5: Enable 6: Disable

Related Article

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.