centos安装php-memcached

post by rocdk890 / 2013-1-21 22:55 Monday linux技术
  今天同事给我说了,我才知道原来还有php-memcached,我一直以为只有memcached和php-memcache,好了,现在来给大家说下怎么安装php-memcached.
  系统:centos 5.5
  需要的软件包:libmemcached-1.0.15.tar.gz
                     memcached-2.1.0.tgz
1.安装前准备
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
wget http://pecl.php.net/get/memcached-2.1.0.tgz

2.安装libmemcached
tar zxf libmemcached-1.0.15.tar.gz && cd libmemcached-1.0.15
./configure --prefix=/usr/local/libmemcached  --with-memcached
make && make install

3.安装php-memcached
tar zxf memcached-2.1.0.tgz && cd memcached-2.1.0
/usr/local/php/bin/phpize
./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
make && make install
vi /etc/php.d/memcached.ini
extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcached.so"

4.验证
php -m|grep memcached
memcached

最后重启apache.

好了,php-memcached就可以算是安装成功了.
夜空- 本站版权
1、本站所有主题由该文章作者发表,该文章作者与夜空享有文章相关版权
2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和夜空的同意
3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、原文链接:blog.slogra.com/post-313.html

标签: 安装 php memcached php-memcached libmemcached

评论: