Install and run Redis locally

How to configure Redis to run it in your local machine.


Aug 18, 2020
featured image
The easiest way is through Brew, a package manager. So if you have not installed yet, run this:
      
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
      
    
      
$ brew update
$ brew install redis
      
    
Start the service
      
$ brew services start redis
      
    
Ping in order to see if it is running properly
      
$ redis-cli ping
PONG
      
    
Another option is to enter to the prompt and run commands from there
      
$ redis-cli
127.0.0.1:6379> ping
PONG
      
    
To stop the service run:
      
$ brew services stop redis
      
    
Redis configuration file:
      
/usr/local/etc/redis.conf
      
    
Uninstall Redis and all related files.
      
$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
  
    

Now you can play with more commands such as Delete all keys by a prefix in Redis cluster

Guide based on this document


redis dev