-
-
Save huobazi/1098886 to your computer and use it in GitHub Desktop.
添加 删除ubuntu自启动服务 init.d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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就可以了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
添加一个服务 | |
#sudo update-rc.d 服务名 defaults 99 | |
删除一个服务 | |
#sudo update-rc.d 服务名 remove | |
临时重启一个服务 | |
#/etc/init.d/服务名 restart | |
临时关闭一个服务 | |
#/etc/init.d/服务名 stop | |
临时启动一个服务 | |
#/etc/init.d/服务名 start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment