I installed redis 3.2 on a Centos 7 system based on this tutorial: http://linoxide.com/storage/install-redis-server-centos-7/

After that i exchanged the initScript with this from github: https://gist.github.com/paulrosania/257849

Redis is not starting on boot.

I read a lot of topics regarding this issues but nothing is working for me. systemd is not starting redis-server on boot. daemonize is set to "no", the redis.service file exists with Type=forking

If i start it with "/etc/init.d/redis start" or "service redis start" it is starting correctly with no errors.

  • Welcome to Server Fault! In general questions/problems regarding the usability of or inaccuracies in HOWTO's and manuals should be addressed to their author and not posted on ServerFault. - Alternatively read our guide to writing good questions and post an on-topic question that contains sufficient details/errors/configuration-settings about your setup to provide you with a good solution, rather than confusing the issue with potential issues in both that guide and/or how accurate it was followed.
    – HBruijn
    Jul 2 '16 at 7:11

You need to run systemctl enable redis_6379 to enable the redis service at boot. (The name of the service depends of course how you configured it. If you followed the linked tutorial it is redis_6379).

You might need to run systemctl daemon-reload to make systemd aware of the new unit file for the redis service before you can enable the service.

To start, stop, restart, disable the service you should use the systemd tool systemctl as well.

To start for example use:

systemctl start redis_6379

  • Thank you, now it is starting at boot. but after 90 seconds it is terminated again. looks like some timeout. also commands with /etc/init.d/redis status|start| etc. do not work. only systemctl start|status redis_6379 does which is fine for me but i just noticed.
    – metabolic
    Jul 1 '16 at 14:26
  • 1
    Than redis is not configured correct. Take look at the application log. You probably followed a bad tutorial. Calling init scripts from unit files is (in my opinion) bad style and missing the systemctl enable indicates that the author did not really understand how systemd works. Jul 1 '16 at 14:37
  • ok, i do not get it... nearly every solution i found said "set daemonize to 'no' then it will work". systemd tried to start redis, but terminated it after 90sec because it could not start it. at least this was the interpretation of systemd because if daemonize is set to no redis is of course blocking... after i set it to "yes" everything is working fine.
    – metabolic
    Jul 5 '16 at 21:42

For command

systemctl enable redis_6379

I got "Failed to enable unit: Unit file redis_6379.service does not exist."


systemctl enable redis

Works good for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.