Debian 上使用 rc.local
作者: Bluedata | 可以转载,转载时务必以超链接形式标明文章原始出处和作者信息及版权声明
网址: http://bluedata.org/2006/04/30/debian-rclocal/
网址: http://bluedata.org/2006/04/30/debian-rclocal/
# touch /etc/init.d/rc.local
设置为可执行:
# chmod +x /etc/init.d/rc.local
用 update-rc.d 设置启动级别:
# update-rc.d rc.local start 99 2 3 4 5 . stop 99 0 1 6 .
为了编辑方便,创建一个链接:
# ln -s /etc/init.d/rc.local /etc/rc.local
# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
## start apache
/usr/local/apache/bin/apachectl start

















