安装PHP的MEMCACHE扩展
下载http://pecl.php.net/package/memcache
tar -zxvf memcache-3.0.8.tgz
cd memcache-3.0.8.tgz
/usr/bin/phpize
./configure --enable-memcache
make && make install
显示完成:Installing shared extensions: /usr/lib/php/modules/
添加php扩展文件
vim /etc/php.ini
extension=memcache.so
安装PHP的MEMCACHED扩展
下载https://launchpad.net/libmemcached/+download
下载http://pecl.php.net/package/memcached
tar -zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18.tar.gz
mkdir /usr/local/share/libmemcached
./configure --prefix=/usr/local/share/libmemcached
make && make install
tar -zxvf memcached-2.2.0.tgz
cd memcached-2.2.0.tgz
/usr/bin/phpize
./configure --with-libmemcached-dir=/usr/local/share/libmemcached/
make && make install
添加php扩展文件
vim /etc/php.ini
extension=memcached.so
重启nginx
service nginx restart 就可以看到memcache扩展模块了
本文转自wks9751CTO博客,原文链接:
http://blog.51cto.com/wks97/1600103
,如需转载请自行联系原作者