DEV Community

Ajeet Singh Raina for Redis

Posted on

How do I run Redis on Windows 10?


Redis stands for REmote DIctionary Server. It is an open source, fast NoSQL database written in ANSI C and optimized for speed. Redis is an in-memory database that means that all data in Redis is stored in RAM, delivering the fastest possible access times to the data for both read and write requests.

Redis is designed and implemented for performance. Redis compiles into extremely efficient machine code and requires little overhead. It uses a (mostly) single threaded event loop model that optimally utilizes the CPU core that it is running on. The data structures used internally by Redis are implemented for maximum performance and the majority of data operations require constant time and space.

Redis is based on the key-value model. In Redis, the data is stored and fetched from Redis by key. Key-based access allows for extremely efficient access times and this model maps naturally to caching, with Redis providing the customary GET and SET semantics for interacting with the data. Also, it supports multi-key operations. Several of Redis’ commands operate on multiple keys. Multi-key operations provide better overall performance compared to performing the operations one after the other, because they require substantially less communication and administration.

You can install Redis on Windows 10 using Windows Subsystem for Linux(a.k.a WSL2). WSL2 is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019. WSL2 lets developers run a GNU/Linux environment(that includes command-line tools, utilities, and applications) directly on Windows.

Follow the below steps to create Redis database on Microsoft Windows 10.

Step 1: Turn on Windows Subsystem for Linux

In Windows 10, Microsoft replaces Command Prompt with PowerShell as the default shell. Open PowerShell as Administrator and run this command to enable Windows Subsystem for Linux (WSL):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enter fullscreen mode Exit fullscreen mode

Reboot Windows after making the change—note that you only need to do this one time.

Step 2: Launch Microsoft Windows Store

start ms-windows-store:
Enter fullscreen mode Exit fullscreen mode

Step 3: Install Redis

The following example works with Ubuntu (you’ll need to wait for initialization and create a login upon first use):

 sudo apt-add-repository ppa:redislabs/redis
 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install redis-server
Enter fullscreen mode Exit fullscreen mode

Step 4: Restart the Redis server

 sudo service redis-server restart
Enter fullscreen mode Exit fullscreen mode

Read more on How to Install Redis on Windows

Discussion (1)

isabellaroy profile image

Such a very helpful information share with us!! how to cast a spell on someone for revenge