文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>debian上使用rc.local

debian上使用rc.local

时间:2006-05-18  来源:windaoo

转来一篇,有用!



debian上使用rc.local

习惯了FreeBSD和RedHat上使用/etc/rc.local 定制服务的自动启动,最近用Debian还真有些不习惯。以下是我搜集到的资料:在debian上创建rc.local文件。

创建文件:
sudo touch /etc/init.d/rc.local
设置可执行:
sudo chmod +x /etc/init.d/rc.local
用update-rc.d设置启动级别:
sudo update-rc.d rc.local start 20 2 3 4 5 . stop 20 0 1 6 .

为了编辑方便,创建一个链接:
sudo ln -s /etc/init.d/rc.local /etc/rc.local

cat /etc/rc.local
# start apache
/home/apache/bin/apachectl start

重启一下,没有问题。

后记:Debian 下没有 rc.local ,不过有一个替代品,就是 /etc/init.d/bootmisc.sh 文件(可以将/etc/rc.local 链接过去)
大家有什么需要启动后运行的,尽管往里面塞 :-P

类似的:也是使用update-rc.d 将相应服务设置成启动就可以了。

相关阅读 更多 +
排行榜 更多 +
无敌赛车王

无敌赛车王

赛车竞速 下载
多人汽车聚会

多人汽车聚会

赛车竞速 下载
漂移基地

漂移基地

赛车竞速 下载