Two ways to boot the CentOS Setup service1, use Chkconfig to configure the boot level
In the case of CentOS or redhat other systems, the system will not start automatically after installation, such as httpd, mysqld, postfix, etc., if the service is installed later. Even if the service is started manually by/etc/init.d/mysqld start, the service will not start automatically as long as the server restarts. At this time, we need to set up after installation, let the system automatically start these services, to avoid unnecessary loss and trouble. In fact, the command is very simple, use chkconfig can.
[Tianya PHP Blog]-[http://blog.phpha.com]
For example, to set the mysqld to boot automatically:
Chkconfig mysqld on
To cancel a service auto-start, simply change the last parameter "on" to "off". For example, to cancel the auto-start of postfix:
chkconfig postfix off
It is important to note that if the service has not been added to the Chkconfig list, it is now necessary to add it using the –-add parameter:
Chkconfig–-add postfix
If you want to query all currently started services automatically, you can enter:
Chkconfig-–list
If you just want to see the specified service, just add the service name after "–-list", such as checking if the httpd service is started automatically:
Chkconfig–-list httpdhttpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
When the 0~6 is off, the HTTPD service does not start automatically when the system starts. We enter:
Chkconfig httpd onhttpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
This time the 2~5 is on, which indicates that it will start automatically.
2, modify/etc/rc.d/rc.local this file:
For example, Apache, MySQL, Samba, SVN, and other services to start the boot problem together:
vi/etc/rc.d/rc.local# Add the following command/usr/sbin/apachectl start/etc/rc.d/init.d/mysqld start/etc/rc.d/init.d/smb start/usr/ Local/subversion/bin/svnserve-d
How to start the CentOS Setup service