Failed to restart redis.service: Unit redis.service not found in Ubuntu
Hello guys, I have a Linux Ubuntu 20.04 and installed a Redis server. Today I restarted the server but Redis server stopped and I tried to restart it by using command
sudo systemctl restart redis.service. But I got an error:
Failed to restart redis.service: Unit redis.service not found.
I tried to reinstall Redis by using the command
sudo apt install redis-server. But I got the error:
Reading package lists... Done Building dependency tree... Done Reading state information... Done redis-server is already the newest version (5:6.0.16-1ubuntu1). The following package was automatically installed and is no longer required: ltrace Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
I also tried to check the status of the Redis server by command
sudo systemctl status redis. I also got an error:
Unit redis.service could not be found.
I feel I can't do anything with Redis. Anyone can enable it to help me.
Thank you in advance.
daniel Jun 03 2022
You need to manipulate with
redis-server. In this case, to enable Redis you can run the command:
sudo systemctl enable redis-server
Your Redis server should be enabled and your issue solved.