After installing MySQL, the default boot will not start automatically, you need to manually set up MySQL let it boot from boot.
First, with the Chkconfig command to see if MySQL is not in a manageable list, the command is:
Chkconfig--list
Messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
If this is not mysqld in the list, you need to add this command first:
Chkconfig Add mysqld
Then use this command to set the boot up:
Chkconfig mysqld on
Messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
For Apache, the operation is as follows
Test environment:
1, Apache 2.2.9, installed under the/USR/LOCAL/APAHCE
2, Centos6.5
The first step:
CP/USR/LOCAL/APACHE/BIN/APACHECTL/ETC/RC.D/INIT.D/HTTPD//If there are other versions of Apache, you can also overwrite them directly.
Step Two:
Use the editor to open the httpd file and add two lines of text below the first line #!/bin/sh as follows
# chkconfig:35 70 30
# Description:apache
Then register the service
Chkconfig–add httpd
Everything OK, start the service
Service httpd Start
httpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
The first of the three numbers in the second row is the one that starts Apache at run level 3 and 5, and the second to third is about the priority configuration of start and stop, which doesn't matter
MySQL boot up