redis启动后的窗口该如何退出?


背景:默认安装,启动redis后,会进入一个redis窗口,如何退出呢?如下图

wKiom1WlK62y-yd7AAHibl-wre8984.jpg


解决方法1: 直接按CTRL+C

解决方法2: 把配置文件改成后台启动 vim /etc/redis.conf

把 daemonize no 改成 daemonize yes
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes