Skip to content

Instantly share code, notes, and snippets.

@samklr
Created November 24, 2016 17:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samklr/e1ef82313f13aa85e1e073ae7ba5240d to your computer and use it in GitHub Desktop.
Save samklr/e1ef82313f13aa85e1e073ae7ba5240d to your computer and use it in GitHub Desktop.
#!/bin/bash
brew install redis
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # load Redis server
# homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf
redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop
redis-cli ping # Pong expected
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Disable Redis autostart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment