To add Redis to self-starting services
[[email protected] redis]# chkconfig --add redis
Service redis does not support chkconfig
Solution :(add a two-line comment to /etc/init.d.redis)
#! / bin/sh
The two-line comments added to # are as follows:
# chkconfig: 2345 90 10
Redis is a persistent key-value database
# comment means that redis services must be started or shut down at runlevel 2,3,4,5, starting priority is 90, closing priority is 10
[[email protected] redis]# chkconfig --add redis
[[email protected] redis]# echo $?
0
[[email protected] redis]# chkconfig --list | grep redis
Redis 0: off1: off2: on3: on4: on5: on6: off
This can also happen when editing other similar services, and the workaround is basically similar
This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1879275
Service Redis does not support Chkconfig