Skip to content

Instantly share code, notes, and snippets.

@ntung
Forked from nrollr/Redis.sh
Created March 9, 2019 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntung/4dba384b0f4981665a2c8443d05168a4 to your computer and use it in GitHub Desktop.
Save ntung/4dba384b0f4981665a2c8443d05168a4 to your computer and use it in GitHub Desktop.
Install Redis via Homebrew
#!/bin/bash
brew install redis # Install Redis using Homebrew
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl
# 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 # Check if the Redis server is running
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