1、拉取memcache扩展
cd /usr/local/src/
git clone https://github.com/websupport-sk/pecl-memcache
2、编译安装memcache扩展
cd pecl-memcache/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
3、安装完成memcache扩展,接下来把它加入php.ini中
extension_dir=usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/
extension=memcache.so
4、重启php-fpm使配置生效
/etc/init.d/php-fpm reload