下载phpredis扩展包
wget https:
//github.com/nicolasff/phpredis/archive/master.zip
2、安装phpredis扩展
# unzip phpredis-master.zip # cd phpredis-master # /usr/local/php/bin/phpize # ./configure --with-php-config=/usr/local/php/bin/php-config # make # make install
3、添加redis扩展
# vim /usr/local/php/etc/php.ini 添加一行 extension = "redis.so
4、重启apache服务
servie httpd restart
5、访问phpinfo查看redis扩展的详细信息