How to Install and Configure Redis on CentOS 7

Redis is an open-source in-memory data structure store. It can be used as a database, cache and message broker and supports various data structures such as Strings, Hashes, Lists, Sets, etc. Redis provides high availability via Redis Sentinel including monitoring, notifications Automatic failover. It also provides automatic partitioning across multiple Redis nodes with Redis Cluster.

This tutorial explains how to install and configure Redis on a CentOS 7 server.


Before starting with the tutorial, make sure you are logged in as a user with sudo privileges.

Installing Redis on CentOS 7

Redis package is not included in the default CentOS repositories. We will be installing Redis version 5.0.2 from the Remi repository.

The installation is pretty straightforward, just follow the steps below:

  1. Start by enabling the Remi repository by running the following commands in your SSH terminal:
sudo yum install epel-release yum-utils
sudo yum install
sudo yum-config-manager --enable remi
  1. Install the Redis package by typing:
sudo yum install redis
  1. Once the installation is completed, start the Redis service and enable it to start automatically on boot with:
sudo systemctl start redis
sudo systemctl enable redis
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/redis.service.
  1. To check the status of the service enter the following command:
sudo systemctl status redis
  1. You should see something like the following:
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
Active: active (running) since Sat 2018-11-24 15:21:55 PST; 40s ago
Main PID: 2157 (redis-server)
CGroup: /system.slice/redis.service
        └─2157 /usr/bin/redis-server

Redis service will fail to start if IPv6 is disabled on your server.

Congratulations, at this point you have Redis installed and running on your CentOS 7 server.

#centos 7 #redis #version 5.0.2

How to Install and Configure Redis on CentOS 7
3.20 GEEK