LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1532|回复: 8

如何配置开机启动项

[复制链接]
发表于 2008-10-8 10:50:07 | 显示全部楼层 |阅读模式
RT
debian不想fedora那样容易配置,所以想请教了一下。

P.S. 修改/etc/init.d/里面文件的 # Default-Start参数是否有效?
 楼主| 发表于 2008-10-8 11:07:21 | 显示全部楼层
在/etc/rc2.d下README有如下说明:
To disable a service in this runlevel, rename its script in this directory
so that the new name begins with a 'K' and a two-digit number, where the
number is the difference between the two-digit number following the 'S'
in its current name, and 100.  To re-enable the service, rename the script
back to its original name beginning with 'S'.


比如:在/etc/rc2.d下有一个S20crossfire-server文件,默认开机启动级别为2,我启动系统时不想启动crossfire-server,是不是把S改为K即可?
回复 支持 反对

使用道具 举报

发表于 2008-10-8 18:51:36 | 显示全部楼层
你安装rcconf试试看,和红帽的ntsysv相似。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-8 19:18:47 | 显示全部楼层
Post by simon22543;1891801
你安装rcconf试试看,和红帽的ntsysv相似。


rcconf是配置哪个级别的呢?
回复 支持 反对

使用道具 举报

发表于 2008-10-9 00:58:35 | 显示全部楼层
rcconf 是配置 /etc/init.d 的内容,并非个别级别

要配置个别的级别,可以手动或者用 update-rc.d 命令
回复 支持 反对

使用道具 举报

发表于 2008-10-9 01:40:17 | 显示全部楼层
或者用 sysv-rc-conf,可以个别级别设置。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-9 13:28:21 | 显示全部楼层
非常感谢各位的热情解答。
总结:
rcconf 配置 /etc/init.d 的内容
sysv-rc-conf 配置各个级别
回复 支持 反对

使用道具 举报

发表于 2008-10-9 19:33:53 | 显示全部楼层
别忘了 update-rc.d,掌握它日後会对你很有用的,比如要自建进程。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-9 23:53:03 | 显示全部楼层
谢谢提醒,我好好揣摩一下update-rc.d
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表