Linux – How to recover lost Redis services

How to recover lost Redis services… here is a solution to the problem.

How to recover lost Redis services

I installed an older version of Redis on my CentOS server. I tried to remove that old version and update it to the latest version, but it seems that the redis service is gone and the new version installation does not reproduce it. Is there any way to completely uninstall Redis and do a clean install? Otherwise, is there any way to reinstall the Redis service? When I check the list of services, I see redis in the list, but when I perform service Redis restart, it says “Unrecognized Service”.

Solution

If you want to delete the old Redis package, you can use the yum remove command below.

yum remove redis

Then check that it is still available as shown below

rpm -qi redis

Check the file

rpm -ql redis

If it exists, you can delete it as follows.

rpm -e redis 

(Or you can mention the full name and version of the package).

Then you can install the new version you want.

 wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/

rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm

Then run

yum install redis

Or you can download rpm and install it below

rpm -ivh redis-"version".rpm 

But it’s better to use yum because it works with all dependencies.

Related Problems and Solutions