使用 Homebrew,先安装 homebrew-php,再安装 phpredis
Homebrew
123456789101112
## Setup the homebrew/dupes tap which has dependencies we need:brew tap homebrew/dupes## Setup the homebrew/versions tap which has dependencies we need:brew tap homebrew/versions## Then, run the following in your command-line:brew tap homebrew/homebrew-php## 安装 php-redisbrew install php55-redis ## 针对 php 5.5brew install php56-redis ## 针对 php 5.6