- 论坛徽章:
- 0
|
1. 装个 sysv-conf-rc
2. sudo update-rc.d -f mysql remove 删除mysql随机器启动的服务
sudo update-rc.d -f apache2 remove 删除apache2随机器启动的服务
3.查看/etc/rc2.d/里面的apache和mysql启动脚本,通常都是两个阿拉伯数字后再接一个英文字母,再加脚本名称。英文字母是S的都是会自动启动的,K则相反。所以只要找到apache和mysql的启动脚本,把S改成K就可以了
转载自:http://www.net527.cn/a/caozuoxitong/Linux/2011/0203/16362.html
对于第一步,在我的机器上好像不需要,我也没仔细研究sysv-conf-rc是个什么工具。
update-rc.d这个命令可能在安装好系统后就自带有这个命令,我参照步骤2的说法尝试做了一下
然后打开/etc/rc2.d目录下面的文件,没有找到K开头的跟apache有关的启动脚本,难道是执行步骤2中的命令后它会自动修改还是神马??
不太了解~~~
另外/etc/rc2.d目录下面还有一个README文件,打开它之后其实什么都一目了然了~~
The scripts in this directory are executed each time the system enters
this runlevel.
The scripts are all symbolic links whose targets are located in
/etc/init.d/ .
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, and run 'update-rc.d script defaults' to reorder the scripts
according to dependencies. A warning about the current runlevels
being enabled not matching the LSB header in the init.d script will be
printed. To re-enable the service, rename the script back to its
original name beginning with 'S' and run update-rc.d again.
For a more information see /etc/init.d/README.
http://hi.baidu.com/yfnick/blog/ ... a052b18326acd0.html |
|