How do I restart redis that I installed with brew?
update
brew services expired due to no one want to maintain it. check below: https://github.com/Homebrew/homebrew/issues/28657
check launchctl
function instead.
or lunchy
So instead of:
launchctl load ~/Library/LaunchAgents/io.redis.redis-server.plist
you can do this:
lunchy start redis
and:
lunchy ls
references: https://github.com/eddiezane/lunchy
It used to be able to use as below:
brew services restart redis
should be the restart command You want. You can also run
brew services list
which will give you list of your brew services.
As of Dec-7-2015 You can use brew services
.
You need to brew tap homebrew/services
and then thw following will work as expected:
install brew install redis
start brew services start redis
stop brew services stop redis
restart brew services restart redis
More info here: https://github.com/Homebrew/homebrew-services
Brew doesn't support the services
command anymore.
The recommended way is to use os x's launchctl
command.
First you need to setup redis as a service managed by launchctl:
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then you can use launchctl load
/ launchctl unload
to start/stop the service:
$ # start redis server
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
$
$ # stop redis server
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist