Skip to content

Instantly share code, notes, and snippets.

@nrollr
Created March 29, 2016 11:30
Show Gist options
  • Save nrollr/eb24336b8fb8e7ba5630 to your computer and use it in GitHub Desktop.
Save nrollr/eb24336b8fb8e7ba5630 to your computer and use it in GitHub Desktop.

Revisions

  1. nrollr created this gist Mar 29, 2016.
    11 changes: 11 additions & 0 deletions Redis.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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