installing Redis on Windows, macOS, and Linux:
Redis Installation Guide
1. Windows
Redis doesn’t have an official native Windows build anymore, but you can run it via:
Option A – Using WSL (Windows Subsystem for Linux)
Enable WSL (if not already enabled):
Open PowerShell as Administrator:
wsl --install
- Restart your PC if prompted.
- Install Ubuntu (or another Linux distribution) from the Microsoft Store.
Update & Install Redis inside WSL:
sudo apt update sudo apt install redis-server
Start Redis:
sudo service redis-server start
Test Redis:
redis-cli ping
Output should be:
PONG
Option B – Using Docker
- Install Docker Desktop for Windows.
Pull and run Redis:
docker run --name redis -p 6379:6379 -d redis
Connect with:
docker exec -it redis redis-cli
2. macOS
Option A – Using Homebrew (Recommended)
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Redis:
brew install redis
Start Redis service:
brew services start redis
Test Redis:
redis-cli ping
Option B – Using Docker
- Install Docker for Mac.
Run Redis container:
docker run --name redis -p 6379:6379 -d redis
3. Linux (Ubuntu/Debian)
Apt Package Manager
Update system:
sudo apt update
Install Redis:
sudo apt install redis-server
Enable Redis to start on boot:
sudo systemctl enable redis
Start Redis:
sudo systemctl start redis
Verify:
redis-cli ping
4. Linux (CentOS/RHEL)
YUM/DNF
Install EPEL repository:
sudo yum install epel-release
Install Redis:
sudo yum install redis
Start and enable Redis:
sudo systemctl start redis sudo systemctl enable redis
Test:
redis-cli ping
Tags:
Redis