Introduction
Redis is frequently referred to as a data structures server. This implies that Redis gives users access to flexible data structures through a set of instructions communicated across Transmission Control Protocol (TCP) connections using a simple protocol. As a result, many processes can use the same data structures to query and alter them.
Another appropriate comparison is to think about Redis as a more advanced version of Memcached, including operations such as Lists, Sets, ordered data structures, and so on, rather than just SETs and GETs.
This article will help you gather the prerequisites and instructions for installing Redis on your Linux, macOS, and Windows system.
Also see, Multiple Granularity in DBMS
Installing Redis
Below are the steps to install the Redis data structure server on your Linux, Windows, and macOS systems.

Redis
Source: https://en.wikipedia.org/wiki/Redis
Installing Redis from the source
Redis provides an option to be installed on different operating systems from the source file, independent of the operating system installed on, including Linux and macOS.
C and libc are the only dependencies or prerequisites for Installing Redis.
For installing from the source, follow these steps:
Step 1: Obtain the source file either from the official download page or run the following command in the terminal:
wget https://download.redis.io/redis-stable.tar.gz
Step 2: Extract the files from the tar folder and change the current directory to extracted directory.
tar -xzvf redis-stable.tar.gz
cd redis-stable
Step 3: Install the Redis using the make command in the extracted directory.
make
Two of the following libraries will be present in the src directory on successful installation.
- Redis-server is the name of the Redis Server.
- Redis-CLI is a command-line tool for interacting with Redis.
We can install the above binaries in /usr/local/bin using:
make install
Start your Redis server with:
redis-server
Installing Redis on Linux
Open-source, free operating system distributions of Linux provide Redis packages out of the box. We can install the Redis with the following commands:
sudo apt-get update
sudo apt-get install redis
If the distribution fails to auto-detect the Redis package, run the following command before executing the above one:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
We can alternatively install Redis using the snapcraft store available in various Linux distributions, including centOS.
Follow the below instructions for Installing Redis from snapcraft store:
sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install redis
Installing Redis on Windows
On Windows, Redis is not officially supported. However, you may install Redis on Windows for development purposes by following the methods below.
We must activate WSL2 on Windows before installing Redis (Windows Subsystem for Linux). WSL2 allows us to run Linux binaries on Windows natively.
Requirements: Windows 10 v2004 or Windows 11.
Install WSL2 with the help of Microsoft official documentation.
On the Ubuntu subsystem, run the following commands for Installing Redis:
sudo apt-add-repository ppa:redislabs/redis
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
Start the Redis server with:
sudo service redis-server start
Installing Redis on macOS
Alternatively to Installing Redis from the source, we can install Redis on macOS using homebrew. To confirm if you have homebrew already installed, run the following command:
$ brew --version
On failure of the above command, refer to the official homebrew website for installation.
On successful installation of homebrew, install Redis on macOS, using the following command in the terminal:
brew install redis
You can start the Redis server using:
redis-server
After successful installation, let us help you configure Redis on your system.




