Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis starts manually with init.d but not on startup

Redis properly starts up if I run the command:

sudo /etc/init.d/redis-server start

I've added my startup script with:

sudo update-rc.d redis-server defaults

But when I startup from a fresh boot, Redis isn't running. Where should I look to troubleshoot this?


2 Answers

The defaults thing usually sets starting to 20. It's too early as redis requires networking.

So, try below:

sudo update-rc.d redis-server remove
sudo update-rc.d redis-server start 80 2 3 4 5 . stop 20 0 1 6 .

like image 157
Manu Manjunath Avatar answered Dec 22 '25 07:12

Manu Manjunath


Use the below into the terminal:

sudo systemctl enable redis

It made redis run on startup for me.

like image 30
firebox Avatar answered Dec 22 '25 08:12

firebox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!