Dung (Donny) Nguyen

Senior Software Engineer

Installing Redis

Installing Redis depends on your operating system. Here are the steps for Ubuntu (Linux), macOS, and Windows:

Ubuntu (Linux)

  1. Update your system:
     sudo apt update
     sudo apt upgrade -y
    
  2. Install Redis:
     sudo apt install redis-server
    
  3. Start Redis:
     sudo systemctl start redis
     sudo systemctl enable redis
    
  4. Test Redis installation:
     redis-cli ping
    

    You should see a response: PONG.

macOS

  1. Install Homebrew if you haven’t already:
     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Redis using Homebrew:
     brew install redis
    
  3. Start Redis:
     brew services start redis
    
  4. Test Redis installation:
     redis-cli ping
    

    You should see a response: PONG.

Windows

  1. Enable WSL2 (Windows Subsystem for Linux): Follow Microsoft’s instructions to enable WSL2, choosing Ubuntu as the distribution.
  2. Install Redis in the WSL Ubuntu environment:
     sudo apt update
     sudo apt install redis-server
    
  3. Start Redis:
     sudo systemctl start redis
     sudo systemctl enable redis
    
  4. Test Redis installation:
     redis-cli ping
    

    You should see a response: PONG.

These steps will get you up and running with Redis on your preferred operating system.