Redis Installation on Mac OS

Refer to Redis docs, https://redis.io/docs/getting-started/installation/install-redis-on-mac-os/

First, make sure you have Homebrew installed. From the terminal, run:

brew --version

If this command fails, you will need to install the brew from https://brew.sh/

From the terminal, run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

From the terminal, run:

nano .zshrc

This will edit the .zshrc file

Add the path in the nano editor screen, and then press Control + X to save

export PATH=/opt/homebrew/bin:$PATH

From the terminal, run:

source ~/.zshrc

The brew command should be available now, and we can start with the redis installation

brew --version

From the terminal, run:

brew install redis

This will install Redis on your system.

Redis Command

  • Test redis installation

  • Start redis service

-Check redis info

  • Stop redis service

Redis CLI

  • Connect to Redis

  • SET key value

  • GET key value

  • List all keys

  • Delete key

Example usage:

Last updated

Was this helpful?