首页 > 代码库 > 为php5.6安装memched扩展

为php5.6安装memched扩展

1.由于memcached依赖于libevent,因此需要安装libevent。由于linux系统可能默认已经安装libevent,执行命令:
rpm -qa|grep libevent
查看系统是否带有该安装软件,如果有执行命令:
rpm -e libevent-1.4.13-4.el6.x86_64 --nodeps(由于系统自带的版本旧,忽略依赖删除)

2、下载安装包libevent-2.1.2-alpha.tar.gz

tar -zxvf libevent-2.1.2-alpha.tar.gz

cd  libevent-2.1.2-alpha

make &&make install

3、安装libmemcached 

tar -zxvf libmemcached-1.0.18.tar.gz

./configure -prefix=/usr/local/libmemcached --with-memcached 

make && make install

4、安装memcached

tar -zxvf memched-2.0.2..tar.gz

./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/ --with-php-config=/usr/local/odrive/php56/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached/ --disable-memcached-sasl

make  && make install

技术分享

 

为php5.6安装memched扩展