Insight: How To Install Redis on CentOS 7
What Is Redis ?
Redis is an open source in-memory data structure store. It supports various data structures such as Strings, Hashes, Lists, sets and sorted sets. It is mostly used as a database, cache and message broker. REDIS stands for REmote DIctionary Server.
In this tutorial, We are going to install Redis on CentOS 7.
How To Install Redis on CentOS 7
In order to install Redis on CentOS 7, you need to enable Remi repository at first as we are going to install Redis version 5.0.2 from the Remi repository. Run the following command in your SSH terminal to enable Remi repository.
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
Now, Install the Redis package by running following command:
sudo apt install redis
Now, after installing , You can start the Redis service and enable it to start automatically when system boots on:
sudo systemctl start redis sudo systemctl enable redis
Now check the status of the service with 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-27 10:1:35 PST; 20s ago Main PID: 4550 (redis-server) CGroup: /system.slice/redis.service └─4550 /usr/bin/redis-server 127.0.0.1:6379
Important Note: Redis service will fail to start if IPv6 is disabled on your server.
Let us know if there is any error in this tutorial.