1. The default for System Services program Boot boot method
For example: MYSQLD,HTTPD, etc.
You can use the command directly
Chkconfig mysqld on so that you can start MySQL on the boot.
2. is not a system service, requires a command-initiated
Direct Edit/etc/rc.d/rc.local
Add the Start command at the bottom line. For example:
The code is as follows |
Copy Code |
Su-svn-c "svnserve-d--listen-port 9999-r/opt/svndata"//So boot can automatically start Svnserver. |
1, the start of the program to add the command to the/etc/rc.d/rc.local file, such as the following is the setting up boot httpd.
The code is as follows |
Copy Code |
#!/bin/sh # # This script would be executed *after* all the other init scripts. # You can put your own initialization stuff with If you don ' t # want to does the full Sys V style init stuff.
Touch/var/lock/subsys/local /usr/local/apache/bin/apachectl start |
2, add the written startup script to the directory/etc/rc.d/init.d/, and then use the command chkconfig to set the boot up.
For example: We write the httpd script and put it into the/etc/rc.d/init.d/directory, using
The code is as follows |
Copy Code |
Chkconfig--add httpd Chkconfig httpd on
|
The command is set to boot.