1.安装

$ brew install redis

(cv)$ pip install redis

2.启动redis服务器

$ redis-server

3.启动redis客户端

$ redis-cli

127.0.0.1:6379> #ip:port

4.停止redis(客户端)

127.0.0.1:6379> shutdown

not connected> exit