How can I stop redis-server?

前端 未结 26 1851
清歌不尽
清歌不尽 2020-12-07 06:51

I apparently have a redis-server instance running because when I try to start a new server by entering redis-server, I\'m greeted with the followin

26条回答
  •  猫巷女王i
    2020-12-07 07:09

    For OSX, I created the following aliases for starting and stopping redis (installed with Homebrew):

    alias redstart='redis-server /usr/local/etc/redis/6379.conf'
    alias redstop='redis-cli -h 127.0.0.1 -p 6379 shutdown'
    

    This has worked great for local development!

    Homebrew now has homebrew-services that can be used to start, stop and restart services. homebrew-services

    brew services is automatically installed when run.

    brew services start|run redis 
    brew services stop redis
    brew services restart redis
    

    If you use run, then it will not start it at login (nor boot). start will start the redis service and add it at login and boot.

提交回复
热议问题