How to Install Redis on Centos 8

Redis is an in-memory key-value data store that excels at caching and is open-source. Redis is a non-relational database that is well-known for its versatility, scalability, and language support.

1. Installing Redis

dnf install redis

Configure Redis to use with systemd service. Use a text editor to open this file like vim

vim /etc/redis.conf

The supervised directive can be found within the file. Since you run CentOS using the systemd init system, change it to systemd

# Note: these supervision methods only signal "process is ready."
#       They do not enable continuous liveness pings back to your supervisor.
supervised systemd

After changing, start the Redis service and enable it on boot.

systemctl start redis
systemctl enable redis

By running the following, you can check Redis status

sudo systemctl status redis

You can test its functionality with this command once you have confirmed that Redis is in fact running

redis-cli ping

PONG should be printed as the answer:

Output
PONG

This means that your server now includes Redis running successfully.

If you need to configure Redis with all it’s security and maximum performance to boost your website speed, the setup will be covered FREE on our Server Management plan.

FREE SERVER AUDITING

Get Auditing Report of Your Server for FREE!!