码迷,mamicode.com
首页 > 其他好文 > 详细

service redis does not support chkconfig

时间:2016-12-04 17:42:30      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:chkconfig

添加redis到自启动服务:

[root@redis01 redis]# chkconfig --add redis
service redis does not support chkconfig
解决方法:(在/etc/init.d/redis添加两行注释)
#!/bin/sh
#添加的两行注释内容如下:
# chkconfig:   2345 90 10
# description:  Redis is a persistent key-value database
# 注释的意思是,redis服务必须在运行级2,3,4,5下被启动或关闭,启动的优先级是90,关闭的优先级是10
[root@redis01 redis]# chkconfig --add redis
[root@redis01 redis]# echo $?
0
[root@redis01 redis]# chkconfig --list | grep redis
redis          0:off1:off2:on3:on4:on5:on6:off

在编辑其它类似服务时,也可能出现这种情况,解决方法基本类似

本文出自 “冰冻vs西瓜” 博客,请务必保留此出处http://molewan.blog.51cto.com/287340/1879275

service redis does not support chkconfig

标签:chkconfig

原文地址:http://molewan.blog.51cto.com/287340/1879275

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!