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

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

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can quickly deploy your cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

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

sudo yum update -y

Step 1: Install EPEL Repository
We are going to install the EPEL Repository as Redis is not available in the default CentOS 7 Repository. Issue the command below to install:

sudo yum 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:

redis-cli
  • Your prompt will change to 127.0.0.1:6379>.
  • Run the command ping, which should return a PONG as shown below