Notes on installing Redis on Mac using Homebrew. (Last updated: 2017/03/31)
First, install redis with homebrew.
% brew install redis
==> Downloading http://redis.googlecode.com/files/redis-2.6.14.tar.gz
######################################################################## 100.0%
==> make -C /private/tmp/redis-ghPL/redis-2.6.14/src CC=cc
==> Caveats
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
==> Summary
/usr/local/Cellar/redis/2.6.14: 10 files, 1.3M, built in 8 seconds
If you want redis to start automatically when the PC boots up, run the following commands.
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
To manually start redis without setting up auto-start, you can start it with the following command.
redis-server /usr/local/etc/redis.conf
Check if you can connect to Redis from the terminal with the following command.
% redis-cli
redis 127.0.0.1:6379>
That’s all from the Gemba.