1. 下载安装包
当前最新版本为5.0.5
2. 解压安装
$tar xzf redis-5.0.5.tar.gz
$cd redis-5.0.5
$make
在安装时候如果提示
`invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun`
则需要安装 Xcode toolkit,参考 https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/
xcode-select --install
然后再继续make