1、首先查看可以按照的redis版本: brew search redis

2、选择合适的版本进行安装: brew install redis@3.2

redis@3.2 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have redis@3.2 first in your PATH, run:
echo 'export PATH="/usr/local/opt/redis@3.2/bin:$PATH"' >> ~/.profile
To have launchd start redis@3.2 now and restart at login:
brew services start redis@3.2
Or, if you don't want/need a background service you can just run:
/usr/local/opt/redis@3.2/bin/redis-server /usr/local/etc/redis.conf
3.启动服务:brew services start redis@3.2

【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!