brew services start redis@4.0
上为启动
brew install redis@4.0
⬆️安装redis
redis@4.0 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@4.0 first in your PATH run:
echo 'export PATH="/usr/local/opt/redis@4.0/bin:$PATH"' >> ~/.zshrc
To have launchd start redis@4.0 now and restart at login:
brew services start redis@4.0
Or, if you don't want/need a background service you can just run:
/usr/local/opt/redis@4.0/bin/redis-server /usr/local/etc/redis.conf
⬆️配置zshrc文件