How to Install Redis on Fedora 29 / Fedora 28

Welcome to our tutorial on how to Install Redis on Fedora 29 / Fedora 28. Redis is an open-source in-memory data store with optional persistent writes to disk. You can use Redis as a message broker, database or for caching. It supports strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and other data structures.

How to Install Redis on Fedora 29 / Fedora 28

Follow the steps below to install Redis on Fedora 29 / Fedora 28. You can choose to do a clustered setup or a single instance installation. This installation is for a single instance but I’ll cover Redis cluster setup in my next article.

Step 1: Update Fedora 29 / Fedora 28 system

Start the installation by ensuring your system is up to date.

sudo dnf -y update

Step 2: Install Redis on Fedora 29 / Fedora 28

Once your system is updated, install Redis on Fedora 29 / Fedora 28 by running the command:

sudo dnf -y install redis

Step 3: Start Redis Service

Once the package is installed, start and enable Redis service to start on boot

sudo systemctl enable --now redis

Step 4: Configure Redis Server

We will consider few Redis standard configurations

Enable Listen on all interfaces

By default, Redis service listens on 127.0.0.1. Allow the service to listen on all network interfaces if you need remote clients to connect to it.

Open the file /etc/redis.conf with your favorite text editor

sudo vim /etc/redis.conf

Then change line 66 bind 127.0.0.1 to below:

bind 0.0.0.0

Configure Redis Authentication

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