Friday, September 7, 2018

Installing Redis on Windows

Recently I started working on a new project and we use Mac there. I wanted to have the development environment set up in my Windows machine and one of the requirements is I wanted to have a Redis instance there. Went to the Redis download page and surprisingly I couldn’t find any installer for Windows. I was looking for options.

I found this, MicrosoftArchive/redis on GitHub, a repository of Redis Windows port developed by Microsoft Open Tech. But unfortunately, that doesn’t seem to be maintained, the last Redis version available for download is Redis 3.2.1 while Redis 4.0.11 is the latest stable version.

I wasn’t quite convinced whether I should go with that, but then suddenly I remembered we have Docker. I should be able to get it up and running with just one command.
docker run --name redis -p 6379:6379 redis

docker run

The image got downloaded without any issue, but it didn’t start, failed with the error "Error response from daemon: driver failed programming external connectivity on endpoint redis".

Another bump, checked whether the image and container is present, it is.
Deleted the container named “redis”, restarted Docker and ran the command again. This time the image won't get downloaded since it's already present, will only create and start the container.

docker run
Redis container just started. Anyway, I wanted to make sure it's up and running.

docker ps
That is wonderful. It’s up. With very little steps, I have Redis running on Windows.

Happy Coding.


No comments:

Post a Comment