所谓覅破解 发表于 2017-4-14 11:32:13

memcache的配置

  memcache的安装
  安装包下载:
  wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
wget http://pecl.php.net/get/memcache-2.2.5.tgz
  libevent安装
tar zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
/configure --prefix=/usr/local/libevent
make && make install
  memcached安装
tar zxvf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure --prefix=/usr/local/memcached--with-libevent=/usr/local/libevent
make && make install
   开机启动

vim /etc/rc.lcoal

/usr/local/memcached/bin/memcached -d -m 4000-u root -p 11211
  memcache-php安装

需要用到php开发包
yum install php-devel
apt-get install php-devel
 tar vxzf memcache-2.2.5.tgz
 cd memcache-2.2.5
 /usr/bin/phpize
 ./configure -enable-memcache -with-php-config=/usr/bin/php-config -with-zlib-dir
 make && make install


   找到memcache.ini配置
添加下面配置
extension=memcache.so

memcache.dbpath="/var/lib/memcache"
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0
 
页: [1]
查看完整版本: memcache的配置