
I assume you are using a Raspberry Pi based on the ARMv7 or ARMv8 architecture such as the Raspberry Pi 3 Model B+ or Raspberry Pi 2 Model B.
INSTALL REDIS DOCKER INSTALL
Let's install Docker on the Raspberry Pi as a first step so we can ultimately install the latest version of Redis! Install Docker on the Raspberry Pi

INSTALL REDIS DOCKER SOFTWARE
Docker utilizes a feature of the Linux kernel that has been around for a while, kernel namespaces, to provide an isolated workspace for software programs to run without interfering with other programs running on the host machine. Docker containers provide a clean and easy way to achieve software deployments that are reliable and guaranteed to work, as a direct antithesis to the WOMM (Works on My Machine) approach we have struggled with since the dawn of the digital age. As described in Wikipedia, Docker is a "software program that performs operating-system-level virtualization, also known as containerization". I've tried it and it works, but I wanted something with a bit more flexibility, repeatability, and easibility. Habilis, a developer from Canada, provides an article that describes this very process. We could compile Redis from source code and install it ourselves.

INSTALL REDIS DOCKER HOW TO
How did I solve this dilemma and install the latest version of Redis given the obsolescing packages housed in Raspbian repository? My ship ⛵️ came in with Docker!😀 In this article, we learn how to install Redis on a Raspberry Pi using Docker. Since the Raspbian package repository follows the LTS (long term support) Debian releases, the packages available are conservative and stable, but often dated. I updated my Raspbian package list using " sudo apt update" and, much to my chagrin, the most recent version of Redis available was Redis 3.2.6 which was almost two years old. With the introduction of the new Stream data type in Redis 5.0, I decided it was time to get the new Redis 5.0 bits up and running on my Raspberry Pi as Redis Streams looked like it could be useful in a number of IoT scenarios. I'm a big fan of Redis, a fast in-memory database that persists on disk, and I've previously written a Guide to Using Redis with Node.js which provides a fairly comprehensive overview of using Redis from the command line and using it in conjunction with Node.js.
