brew install redis cd /usr/local/Cellar/redis/5.0.7/bin/ 进入安装目录 redis-server 启动server ps -ef | grep redis-server 查看server端口号 501 36982 1180 0 11:39上午 ttys002 0:00.07 redis-server *:6379 redis-cli -h 127.0.0.1 -p 6379 连接并使用redis