首页  >  文章  >  后端开发  >  WDCP 安装 最新mcached

WDCP 安装 最新mcached

巴扎黑
巴扎黑原创
2016-11-11 14:57:251123浏览

Java代码  

先安装sasl  

yum install cyrus-sasl-plain cyrus-sasl  cyrus-sasl-devel  cyrus-sasl-lib  

yum  install gcc+ gcc-c++  

Java代码  

#先安装libmemcached  
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz  
  
tar zxvf libmemcached-1.0.18.tar.gz  
  
cd libmemcached-1.0.18  
  
./configure --prefix=/usr/local/libmemcached --enable-sasl  
  
make  
  
make install

Java代码  

yum install zlib-devel  
  
wget http://pecl.php.net/get/memcached-2.2.0.tgz  
  
tar  zxvf  memcached-2.2.0.tgz  
  
cd memcached-2.2.0  
  
/www/wdlinux/php/bin/phpize   
  
./configure -with-libmemcached-dir=/usr/local/libmemcached -enable-memcached-sasl --with-php-config=/www/wdlinux/apache_php-5.4.26/bin/php-config  
  
#--with-php-config php-config文件目录, 在bin下面  
make  
  
make install

Java代码  

#最后在php.ini中加入  
[memcached]  
extension=memcached.so

Java代码  

#开启session缓存  
session.save_handler = memcached  
session.save_path = "host"  
extension=memcached.so  
memcached.use_sasl = On  
memcached.sess_binary = On  
memcached.sess_sasl_username = "username"  
memcached.sess_sasl_password = "password"  
memcached.sess_locking = Off


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn