apt-get install git php-dev
git clonehttps://github.com/nicolasff/phpredis.git??//這里注意一下那個有php7的是沒辦法完成的,應該是github上的變化,現在直接克隆這個就可以了。
cd phpredis/
phpize
./configure
make
make install
vim /etc/php/7.0/fpm/conf.d/redis.ini? //這個是寫一個配置文件
extension=redis.so? //配置文件的內容(沒錯,就這一句)
/etc/init.d/php7.0-fpm restart 重啟php