You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

How to Install Redis on RHEL 7 Server / Desktop system?. Redis is an Open Source in-memory data store which can be used as a database server, as a message broker, or to cache data in memory for faster retrieval.

In this article, we will cover the steps used to Install Redis on RHEL 7 Server. The version of Redis installed will be the latest stable available. A pre-requisite for this installation is existing RHEL 7 server/Desktop.

Step 1: Register your RHEL 7 server

Start by registering your RHEL 7 server with Red Hat Subscription Management or Satellite server.

sudo subscription-manager register --auto-attach

Input your username and password when prompted.

Step 2: Enable required repositories

After registering the system, enable RHEL 7 repositories.

sudo subscription-manager repos --enable=rhel-7-server-rpms \
  --enable=rhel-7-server-extras-rpms \
  --enable=rhel-7-server-optional-rpms

Also add EPEL and Remi repositories.

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Step 3: Install Redis on RHEL 7

Now install Redis on RHEL 7 using the following commands.

sudo yum install -y redis --enablerepo=remi

Enable and start the service after installation.

sudo systemctl enable --now redis

If you have an active firewalld service, allow port 6379

sudo firewall-cmd --add-port=6379/tcp --permanenent
sudo firewall-cmd --reload

Step 4: Configure Redis Authentication (optional)

Configure Redis Authentication for clients to require AUTH <PASSWORD> before processing any other commands.

requirepass  <AuthPassword>

Example:

requirepass [email protected]

Restart redis service after making the changes

sudo systemctl restart redis

Step 5: Test Redis Installation on RHEL 7

Confirm that you can connect to redis locally:

$ redis-cli
127.0.0.1:6379>

Test authenticate:

127.0.0.1:6379> AUTH <AuthPassword>
OK

You should receive OK in the output. If you input a wrong password, Authentication should fail:

127.0.0.1:6379> AUTH WrongPassword 
(error) ERR invalid password

Check redis information.

127.0.0.1:6379>  INFO

In this article, you have learned how to Install and Configure Redis Server on RHEL 7. Stay connected for more articles.

Similar:

How to Monitor Redis Server with Prometheus and Grafana in 5 minutes

How to setup an Etcd cluster on Linux

How To Monitor Etcd Cluster with Prometheus and Grafana

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF