How to Install Redis on centos

how to install redis
Tutorial

How to Install Redis on centos

Redis is an open source , in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

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

Prerequisites

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

Installing Redis on CentOS 7

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 http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    sudo yum-config-manager --enable remi
  2. Install the Redis package by typing:
    sudo yum install redis
  3. 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/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.

    To check the status of the service enter the following command:

    sudo systemctl status redis

    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
            └─limit.conf
    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 127.0.0.1:6379
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.

Leave your thought here

Your email address will not be published. Required fields are marked *

× Let's chat now...