2.2 KiB
2.2 KiB
Redis Setup for Windows
Method 1: Using Memurai (Redis-compatible for Windows)
Memurai is a Redis-compatible server for Windows.
-
Download Memurai:
- Visit: https://www.memurai.com/get-memurai
- Download the installer
-
Install:
- Run the installer
- Choose default options
- It will automatically start as a Windows service
-
Verify:
# Check if service is running Get-Service Memurai # Or connect with redis-cli memurai-cli ping # Should return: PONG -
Configure (if needed):
- Default port: 6379
- Service runs automatically on startup
Method 2: Using Docker Desktop
-
Install Docker Desktop:
- Download from: https://www.docker.com/products/docker-desktop
-
Start Redis Container:
docker run -d --name redis -p 6379:6379 redis:7-alpine -
Verify:
docker ps | Select-String redis
Method 3: Using WSL2 (Windows Subsystem for Linux)
-
Enable WSL2:
wsl --install -
Install Redis in WSL:
sudo apt update sudo apt install redis-server sudo service redis-server start -
Verify:
redis-cli ping # Should return: PONG
Quick Test
After starting Redis, test the connection:
# If you have redis-cli or memurai-cli
redis-cli ping
# Or use telnet
Test-NetConnection -ComputerName localhost -Port 6379
Troubleshooting
Port Already in Use
# Check what's using port 6379
netstat -ano | findstr :6379
# Kill the process if needed
taskkill /PID <PID> /F
Service Not Starting
# For Memurai
net start Memurai
# Check logs
Get-EventLog -LogName Application -Source Memurai -Newest 10
Configuration
Default Redis/Memurai configuration works out of the box. No changes needed for development.
Connection String: redis://localhost:6379
Production Considerations
- Use Redis authentication in production
- Configure persistence (RDB/AOF)
- Set up monitoring and alerts
- Consider Redis Cluster for high availability
Recommended for Windows Development: Memurai (easiest) or Docker Desktop