How can I stop redis-server?

前端 未结 26 1575
清歌不尽
清歌不尽 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条回答
  • 2020-12-07 07:27

    I don't know specifically for redis, but for servers in general:

    What OS or distribution? Often there will be a stop or /etc/init.d/... command that will be able to look up the existing pid in a pid file.

    You can look up what process is already bound to the port with sudo netstat -nlpt (linux options; other netstat flavors will vary) and signal it to stop. I would not use kill -9 on a running server unless there really is no other signal or method to shut it down.

    0 讨论(0)
  • 2020-12-07 07:28

    Type SHUTDOWN in the CLI

    or

    if your don't care about your data in memory, you may also type SHUTDOWN NOSAVE to force shutdown the server.

    0 讨论(0)
提交回复
热议问题