DEV Community

Muhamad Haris Setiawan
Muhamad Haris Setiawan

Posted on

How to Install Redis (MacOS)

Hallo since i'm hard to find article, and it's separated from one article to another. I wrote this to make easy installation of redis on MacOS

First of all, we need install homebrew on our mac. this link will guide you to install Homebrew

Installation Redis

$ brew install redis
Enter fullscreen mode Exit fullscreen mode

To make our redis run on background you'r just need copy and execute this script

$ brew services start redis
Enter fullscreen mode Exit fullscreen mode

To make sure your redis good to go copy and execute this script

$ redis-cli ping
PONG
Enter fullscreen mode Exit fullscreen mode

Well it's Pong return your ready to rock.
To make secure password on redis you can edit configuration and type some secret just like this.

$ nano /usr/local/etc/redis.conf
Enter fullscreen mode Exit fullscreen mode

find
requirepass : foo
and change to
requirepass :

And restart your redis service

$ brew services restart redis
Enter fullscreen mode Exit fullscreen mode

Now your good to go ☕️

Discussion (1)

Collapse
euankennedy profile image
euankennedy

No way… this is exactly what docker rescues us from doing! Why install it on your Mac when you can spin up an image at will?