Add http, mysql, and so on to centos for startup

Source: Internet
Author: User

Add http, mysql, and so on to centos for startup

Sometimes, you need to restart the server for various reasons. After restarting the server, you can find that the website cannot be opened. In October, the service was not enabled. You have sorted out the following command to add the service to the startup:
1. View startup items:

Chkconfig -- list

Here we can see that httpd and mysqld are not set to enable auto start upon startup.

2. Set boot start:

Chkconfig httpd on

View the result again:

3. If the service to be started cannot be found in the list, add it manually:

Chkconfig -- add sveserve

4. Cancel startup:

Chkconfig httpd off

You can also directly modify the/etc/rc. d/rc. local file and add the following command:

/Etc/rc. d/init. d/mysqld start...

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.