Set centos To Enable Automatic startup

Source: Internet
Author: User

Install servers such as Apache and MySQL on centosProgramIt is not set to enable automatically after the boot. To avoid manual enabling of Web and other servers after the restart, you must set the settings as follows:ChkconfigCommand.

 

For example, to automatically start MySQL, Apache, and vsftpd services after the instance is started, run the following command:

 
Chkconfig mysqld onchkconfig httpd onchkconfig vsftpd on

 

To disable automatic startupOnChangeOffThat's all.

 
Chkconfig mysqld offchkconfig httpd offchkconfig vsftpd off

 

However, if a service has not been added to the chkconfig list-AddAdd the following parameters:

 
Chkconfig-add Postfix

 

To query all the automatically started services, enter:

 
Chkconfig-list

However, this shows that there are too many things and it looks dizzy. What if I only want to view the specified service? At this time, you only need to-List"And then add the service name. For example, to check whether the HTTPd service is automatically started, enter:

 
Chkconfig-list httpd

Output result at this time:

 
Httpd0: Off1: Off2: Off3: Off4: Off5: Off6: Off

At this time, 0 ~ If both are off, the HTTPd service will not be automatically started when the system starts. We enterChkconfig httpd onThen, check the output result again:

Httpd0: Off1: Off2: On3: On4: On5: On6: Off

2 ~ If all five are on, it indicates that it will be automatically started.

 

Http://www.wincold.com/archives/151.html

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.