1. 先通过homebrew查看能够安装的redis;
brew search redis
2. 通过homebrew安装redis
brew install redis@6.2
3. 启动redis
brew services start redis@6.2
4. 配置路径
vim ~/.zshrc打开进入insert模式后插入:
echo 'export PATH="/opt/homebrew/opt/redis@6.2/bin:$PATH"' >> ~/.zshrc
退出后source ~/.zshrc保存
5. 启动 Redis 服务
redis-server