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 --versionIf 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 .zshrcThis 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:$PATHFrom the terminal, run:
source ~/.zshrcThe brew command should be available now, and we can start with the redis installation
brew --versionFrom the terminal, run:
brew install redisThis 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?