DEV Community

Cover image for Installing and setting up Redis server for Mac OS.
systemsruminator
systemsruminator

Posted on • Originally published at binaryruminations.hashnode.dev on

Installing and setting up Redis server for Mac OS.

Homebrew is one of the nifty command line tools available in Mac OS for quickly and seamlessly installing and configuring development tools.

So let's get a redis server up and running locally in 4 simple steps!

Installation

  • $ brew install redis There will be some info about caveats regarding configuration. You can read and leave it for now.

With this simple command, redis is installed on your mac.

Configuring Redis

Location of Redis configuration file.

$ usr/local/etc/redis.conf

Get Redis package information

$ brew info redis

Launch Redis when system boots up

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

Starting Redis server via “launchctl”

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Starting Redis server using configuration file

$ redis-server /usr/local/etc/redis.conf

Stop Redis on autostart on computer start

$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Uninstall Redis and its files

$ brew uninstall redis

$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Test if Redis server is running

$ redis-cli ping

If it replies PONG , then you are good to go!

Top comments (1)

Collapse
 
biswabijaya profile image
Biswabijaya Samal • Edited