Created
November 14, 2014 13:17
-
-
Save gentilfp/e723cc48696095406298 to your computer and use it in GitHub Desktop.
Auto start REDIS on MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install redis with homebrew :) | |
$ brew install redis | |
# Create a deamon | |
$ sudo vim /Library/LaunchDaemons/io.redis.redis-server.plist | |
# Paste the following content | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>io.redis.redis-server</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/redis-server</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> | |
# Load the deamon | |
$ sudo launchctl load /Library/LaunchDaemons/io.redis.redis-server.plist | |
# Start manually | |
$ sudo launchctl start io.redis.redis-server | |
# Stop manually | |
$ sudo launchctl stop io.redis.redis-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment