Debian 上使用 rc.local

2006-04-30 | 15:44分类:Debian | 标签: | 616 Views

# 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

发表您的评论

您的名字: (*必填)
您的邮箱:(*不会被公布 ,必填)
您的网站: