Redis is an open-source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, HyperLogLogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

You can also view our guide on Installing Redis on Ubuntu

You can also view our guide on Installing Redis on CentOS 7

In this guide, we will explain how to install Redis on a CentOS 8 Server.

Updating System Packages
It is recommended that you update the system to the latest packages before beginning any significant installations. Issue the command below:

sudo dnf update -y

Step 1: Install EPEL Repository
We are first going to install the EPEL Repository as Supervisor by issuing the command below to install if it isn't already installed:

sudo dnf install epel-release

Step 2: Update and Install Redis Server
After adding the EPEL Repository, we need to update our system packages before proceeding to install the Redis package using the command below :

sudo yum update
sudo yum install redis

Step 3: Start and Enable Redis Server
After installation, issue the commands below to start the Redis server and enable it to start on boot:

sudo systemctl enable redis
sudo systemctl start redis

Step 3: Verify the Installation
The next step is to verify that our installation was done successfully with the command below:

  • Your prompt will change to>.

  • Run the command ping, which should return a PONG as shown below