DDR爱好者之家 Design By 杰米

下面将介绍安装php的memcached客户端安装步骤

1、下载安装libmemcached客户端
官网地址:http://libmemcached.org/libMemcached.html

$wget -c https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
#亲 千万不要下载1.0.17哦 有bug
$tar -zxvf libmemcached-1.0.16.tar.gz
$cd libmemcached-1.0.16
$./configure --prefix=/usr/local/libmemcached --with-memcached
$sudo make
$sudo make install

2、下载安装memcached
官网地址:http://pecl.php.net/package/memcached

$wget -c http://pecl.php.net/get/memcached-2.2.0b1.tgz
$tar -zxvf memcached-2.2.0b1.tgz
$cd memcached-2.2.0b1
$sudo /usr/local/php/bin/phpize
$./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached --disabled-memcached-sasl
$sudo make
$sudo make install

3、重启php nginx

$sudo /etc/init.d/nginx restart
$sudo /etc/init.d/php restart

注:如何编写重启nginx和php脚本 参考
php启动脚本
nginx启动脚本

4、检查是否安装成功
phpinfo()函数 如果出现如下 则说明安装成功

linux下安装php的memcached客户端

DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米