怎么没有chkconfig命令?
Tofloor
poster avatar
maokewu
deepin
2015-01-09 18:41
Author
chkconfig是Linux服务管理非常重要的一条命令,Deepin不提供图形界面的服务管理器也罢,但为什么chkconfig命令也不保留下来?是有别的命令替代吗?
Reply Favorite View the author
All Replies
MattD
deepin
2015-01-09 18:43
#1
chkconfig是RH系的命令,而且只适用于他们自己的init服务。
Ubuntu及其衍生版下面请使用update-rc.d。
Reply View the author
Feng Yu
deepin
2015-01-09 21:16
#2
chkconfig是RHEL中的命令,而且到了RHEL7也被废弃了,用于管理init.d服务的脚本而已。

ubuntu下使用update-rc.d命令管理init.d服务和upstart服务。

也可以用sudo apt-get install sysv-rc-conf之后sudo sysv-rc-conf启动终端下的服务管理界面。
Reply View the author
maokewu
deepin
2015-01-10 00:27
#3
可以取消bluetooth服务吗?已经安装了sysv-rc-conf,但这个工具好像不能取消bluetooth服务。
Reply View the author
呆了个呆
deepin
2015-01-10 04:39
#4
等过了这段时间,使用基于 Debian 后,就都得改用 systemctl 了,好好
Reply View the author
Feng Yu
deepin
2015-01-10 05:21
#5
等过了这段时间,使用基于 Debian 后,就都得改用 systemctl 了,好好
debian社区现在不是因为systemd这个玩意闹分裂了么?
Reply View the author
Feng Yu
deepin
2015-01-10 05:39
#6
可以取消bluetooth服务吗?已经安装了sysv-rc-conf,但这个工具好像不能取消bluetooth服务。
sysv-rc-conf主要是批量管理/etc/init.d/下面的服务脚本,和chkconfig的作用完全一样。
管不了/etc/init,而bluetooth的服务脚本在/etc/init/bluetooth.conf。大致google了一下askubuntu上的答案,如果你的机器根本没有蓝牙,可以直接卸载这个服务,不过我测试了一下,发现deepin使用的是bluez5这个包,而且dde居然是依赖这个包的,卸载bluez5会导致整个dde被卸载,没办法通过卸载包的方式。

如果只是想关掉这个服务,开机不自启动,以下两条命令可以搞定
  1. sudo update-rc.d bluetooth disable # 将/etc/rc?.d目录下的bluetooth全部设置为S开头,和chkconfig/sysv-rc-conf干的事情一样
  2. sudo sh -c 'echo manual > /etc/init/bluetooth.override' #禁止upstart服务开机自启动
Copy the Code

这样就可以保证无论init.d还是init服务都无法开机自启动了,想恢复启动只要恢复/etc/rc?.d或者/etc/init任意一个都可以。

如果你的机器是有蓝牙的,只是想开机的时候不自起,需要的时候打开的话,参考askubuntu和ubuntukylin论坛的帖子,http://www.ubuntukylin.com/ukylin/forum.php?mod=viewthread&tid=5940
http://askubuntu.com/questions/67758/ho ... em-startup

相关解释: http://www.cnblogs.com/seanlv/archive/2 ... start.html
Reply View the author