使用chkconfig [服务名] [on/off],设置自启动。
查看当前有哪些自启动服务:
[root@www /]# chkconfig --list
查看某任务是否有自启动
以docker为例
[root@www /]# chkconfig --list docker
开启自启动
[root@www /]# chkconfig docker on
docker 0:off 1:off 2:on 3:on 4:on 5:on 6:off
关闭自启动
[root@www /]# chkconfig docker off
docker 0:off 1:off 2:off 3:off 4:off 5:off 6:off
网友评论