Skip to content

Instantly share code, notes, and snippets.

@JimLiu
Forked from subfuzion/redis-autostart-osx.md
Last active August 29, 2015 14:24

Revisions

  1. @subfuzion subfuzion revised this gist Mar 18, 2014. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions redis-autostart-osx.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    Redis
    -----
    ### Install with Homebrew

    brew install redis

    @@ -20,7 +19,7 @@ You can also more conveniently use `brew` to start, stop, and verify service sta
    $ brew services start redis
    $ brew services stop redis

    ## Notes
    #### Notes

    The default plist provided by homebrew stores the redis configuration at `/usr/local/etc/redis.conf`.

  2. @subfuzion subfuzion revised this gist Mar 18, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions redis-autostart-osx.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    Homebrew
    --------
    Redis
    -----

    brew install redis

  3. @subfuzion subfuzion created this gist Mar 18, 2014.
    32 changes: 32 additions & 0 deletions redis-autostart-osx.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    Homebrew
    --------

    brew install redis

    Set up launchctl to auto start `redis`

    $ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

    `/usr/local/opt/redis/` is a symlink to `/usr/local/Cellar/redis/x.y.z` (e.g., `2.8.7`)

    You can use launchctl to start and stop `redis`

    $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
    $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

    You can also more conveniently use `brew` to start, stop, and verify service status

    $ brew services list | grep redis
    $ brew services start redis
    $ brew services stop redis

    ## Notes

    The default plist provided by homebrew stores the redis configuration at `/usr/local/etc/redis.conf`.

    For more about `launchctl` see:

    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html#//apple_ref/doc/man/1/launchctl

    http://launchd.info/