Failed to restart redis-server.service Unit not found [How to Solve]

Failed to restart redis-server. service: Unit not found.

1. Problem description

Redis-5.0.5 is compiled and installed on CentOS 7.8. The port is 6579. The following error occurs when restarting:

# systemctl start redis
Redirecting to /bin/systemctl restart redis-server.service
Failed to restart redis-server.service: Unit not found.

2. Cause analysis

This is because during compilation and installation, redis registers the service name redis_6579, and the full service name is required for startup.

3. Correct startup mode

# systemctl start redis_6579
or
# service redis_6579 start

Read More: