What is Redis – Installing Redis on Windows

Redis (REmote DIctionay Server) is a very popular open-source, networked, in-memory, key-value data store, sometimes referred to as a data structure server which also comes with optional durability. Redis is well known for high performance, flexibility, provides a rich set of data structures, and a simple straightforward API. The programming language Redis is written in is ANSI C.

The development of Redis has been sponsored by Pivotal since May 2013; before that, it was sponsored by VMware. According to the monthly ranking by DB-Engines.com, Redis is the most popular key-value store. Redis officially runs on Linux and not officially supported on Windows but MS Open Tech has been working with the Redis community to build a production-ready Windows port of Redis, including 64-bit support, an installer for Windows Azure, NuGet support, and much more.

In this series of post I will introduce Redis and it basic functionality using C# and node.js sample code.

To start off lets try to get Redis running on our Windows machine first. We will need to download the MSI from MS Open Tech, the latest version provided by MSOpenTech is 3.2.100 released in 2016.

This is an old version of Redis, I would not suggest installing Redis this way. The recommended way is to use Docker or use the Windows Subsystem for Linux Ubuntu environment

Windows Installation

Launch the msi and follow through the process of the install. Screenshot are attached below:

Linux Install

If you wish to run the latest version 5.0.3 of redis then you will need to install it on a Linux system. The following commands shows how to install redis on a Linux System (Ubunutu)

Ubuntu on Windows Install

There is also another option of installing on your windows machine that is using Windows Subsystem for Linux. One can run Ubuntu on Windows 10 as a subsystem. In order to enable Linux on Windows 10 you will need to run these commands first.

Then you can download the Ubuntu version you wish on the Windows Store. Next you can install Redis by launching the ubuntu prompt, the steps are listed below.

install-redis-windows-ubuntu

install-redis-windows-ubuntu

Validating installation

Once installed on windows or linux we can use the redis-cli to verify if redis is running.
On windows launch your prompt and go to C:\Program Files\Redis
run redis-cli.exe and if you are on Linux just simply run redis-cli

Run these commands, to set and get values

The end result should look something like this.

Redis Prompt

Redis Prompt

If you are having issues with connecting to redis, check out if redis is running, use the redis-server.exe to verify.

Summary

We have learned how to install redis in part 1 series of Redis for .NET Developers. in the upcoming post, I will go through the more details of redis.