How to install redis on your Linux machine

How to install Redis on Ubuntu, RHEL, and CentOS

Most major Linux distributions provide packages for Redis.

Install on Ubuntu/Debian

You can install recent stable versions of Redis from the official packages.redis.io APT repository.

Prerequisites

If you're running a very minimal distribution (such as a Docker container) you may need to install lsb-release first:

sudo apt install lsb-release

Add the repository to the apt index, update it, and then install:

curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list

sudo apt-get update
sudo apt-get install redis

Install from Snapcraft

The Snapcraft store provides Redis packages that can be installed on platforms that support snap.

To install via snap, run:

sudo snap install redis

If your Linux does not currently have snap installed, you may install it by following the instructions described in Installing snapd.

If you need assistance with your projects feel free to email me at info@airgad.com or whatsapp Jesse stay safe!