安装redis扩展
wget https://github.com/phpredis/phpredis/archive/php7.zip unzip php7.zip cd phpredis-php7 /usr/local/data/php/bin/phpize ./configure --with-php-config=/usr/local/data/php/bin/php-config make && make install
安装memcache扩展
https://github.com/websupport-sk/pecl-memcache/archive/php7.zip unzip php7.zip cd pecl-memcache-php7/ /usr/local/data/php/bin/phpize ./configure --with-php-config=/usr/local/data/php/bin/php-config make && make install
启用扩展
vim /usr/local/data/php/etc/php.ini [redis] extension = redis.so [memcache] extension = memcache.so
重启php
service php-fpm reload
转载于:https://blog.51cto.com/thedream/1924352