git clone https://github.com/nicolasff/phpredisphp
(with-php-config 根據自身php-config地址自行修改)git
有兩個PHP .INI 都須要修改 cli fpmgithub
extension_dir=/usr/lib/php/20151012/redis
extension=redis.so測試
完成後重啓測試spa
<?php $redis=newRedis(); $redis->connect('127.0.0.1',6379); $redis->set("name","lyl"); echo $redis->get("name"); ?>