Linux 拨号vps windows公众号手机端

linux开启redis服务后如何退出

lewis 7年前 (2018-09-25) 阅读数 9 #VPS/云服务器
文章标签 linuxredisredis服务

linux开启redis服务后退出的方法:

1.在终端输入以下命令关闭redis-server即可退出。

redis-cli shutdown

示例:

$ps -ef | grep redis

root 23422 19813 0 10:59 pts/5 00:00:08 redis-server *:6379

$sudo redis-cli shutdown

[23422] 05 Mar 12:11:29.301 # User requested shutdown...

[23422] 05 Mar 12:11:29.301 * Saving the final RDB snapshot before exiting.

[23422] 05 Mar 12:11:29.314 * DB saved on disk

[23422] 05 Mar 12:11:29.314 # Redis is now ready to exit, bye bye...

[1]+ Done sudo redis-server (wd: ~/soft/redis-2.10.3)

(wd now: ~/soft/redis-2.8.17)

$ps -ef | grep redis

jihite 30563 19813 0 12:11 pts/5 00:00:00 grep redis

如果redis有设置密码需要通过以下方式关闭退出。

sudo redis-cli -h host -p port -a passwd shutdown

2.退出客户端。

localhost:6379> QUIT

版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门