Site icon Techomoro

How to Run Redis on Windows 10

While the audience of our application is increasing rapidly, it requires more requests to the database. But each request to the database needs a sufficient amount of time. Sometimes we also need to pay more for the requests to the database. So we need to decrease the request to the database in possible situations. Redis is the solution for this. Here we will discuss the steps to run Redis on our Windows 10 system.

What is Redis?

Redis is an open-source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. It supports various data structures such as Strings, Hashes, Lists, Sets, etc.

In simple words, we can store the data from our database in our backend storage as a cache. Afterward, this data is served to our front-end for the same API request through a specific amount of time period.

Redis is made using ANSI C programing language and it uses NoSQL structure to store data which makes it more popular nowadays.

Currently, tech giants like GitHub, Weibo, Pinterest, Snapchat, Craigslist, Digg, StackOverflow, Flickr, etc. are using Redis. So we can trust Redis in using within our application.

Is Redis Compatible with Windows 10?

Redis is made for work with servers. POSIX systems like Linux, *BSD, OS X without external dependencies and is not compatible with Windows systems because Windows servers are not using widely.

But if we are developing an application using Redis on a Windows system, Running Redis in our system is necessary.

Steps to run Redis on Windows 10

So here in this tutorial, we are going to explain the steps to run Redis on a Windows 10 system.

1. Install Ubuntu on Windows 10

We have already told that Redis is not developed to work within Windows systems because Windows servers not using widely. So it requires a Unix-based operating system like Ubuntu, or macOS to run the Redis server.

macOS can only be installed on Windows 10 using Virtualbox and it’s most complicated. But Ubuntu can easily install within our Windows 10 operating system easily because it’s available in the Microsoft store.

We can simply install the LTS version of Ubuntu from the Microsoft store using the link below.

Get Ubuntu 20.04 LTS for Windows 10

Ubuntu is not mandatory to set up the Redis server. It supports other Linux versions such as Debian and Kali Linux. etc.

In this tutorial, we are going to set up a Redis server in Ubuntu operating system. Without using any URLs above, we are manually downloading it from the Microsoft store.

1.1 Open Microsoft Store

First, open the Microsoft Store by searching “store” in the left-bottom Windows 10 search box.

1.2 Install Ubuntu

The Microsoft Store will be opened and now search for Ubuntu. In the top-right search box, search for Ubuntu and click on the latest version(20.04 LTS) from the suggestions and Get the app.

1.3 Launch Ubuntu

So the Ubuntu is installed on our Windows system and now we need to launch it. So search for “ubuntu” in the Windows search box.

An Ubuntu terminal will be opened and this terminal is used to set up Redis.

2. Install Redis on Ubuntu

So we have successfully set up an Ubuntu server inside our Windows operating system.

Now we can install Redis on this Ubuntu system by following the below steps.

2.1 Update and upgrade the packages

Let’s first update and upgrade the packages of our Ubuntu OS with the below commands.

sudo apt-get update
sudo apt-get upgrade

2.2 Install Redis Server

Now we can install the Redis server with the below command. As Redis server is already available in Linux it is easy to install it.

sudo apt-get install redis-server

2.3 Start Redis server

After the successful installation Redis server, we can start the Redis server using the redis-server command.

sudo service redis-server start 

The above commands start the Redis server on our system as shown in the below screenshot.

Now we can close the Ubuntu terminal window. This will not stop the Redis server we have started earlier.

But we have to note that, it needs to start the Redis server after each Windows system reboot. This can be done by running redis-server command.

Summary

So in this article, we discussed the steps to install Redis server on Windows 10. Actually we are downloading the Ubuntu OS for Windows 10 first and installing the Redis server on on it.

Exit mobile version