一,安装Libmemcached
#cd libmemcached-1.0.16 #./configure -prefix=/usr/local/libmemcached -with-memcached=/usr/local/memcached/bin/memcached #make #make install
注:
如果报”./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory”错误,则需要升级gcc版本.
二,安装Memcached PHP扩展
#cd memcached-2.1.0 找到phpize和php-config的路径,我的分别是/usr/local/bin/phpize和/usr/bin/php-config. #/usr/local/bin/phpize #./configure --with-php-config=/usr/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached #make #make install 安装成功后会生成memcached.so,把路径加到php.ini的extension=xxx里.
时间: 2024-10-08 07:39:47