下面是Memcached的安装过程:

#wget http://memcached.googlecode.com/files/memcached-1.4.9.tar.gz

# tar zvxf memcached-1.4.9.tar.gz
# cd memcached-1.4.9
# ./configure --prefix=/usr/local/memcached
# make
# make install

启动Memcached:

# /usr/local/memcached/bin/memcached -d -m 128 -l 127.0.0.1 -p 11211 -u root

参数128指定了内存使用量

接下来是为memcache扩展:

#wget http://pecl.php.net/get/memcache-2.2.6.tgz

# tar zxf memcache-2.2.6.tgz
# php/bin/phpize
# ./configure --with-php-config = /usr/local/php/bin/php-config
# make
# make install

最后将如下配置信息添加到php/lib/memcache.so

备注:/usr/local/php/extensions/no-debug-non-zts-20060613/这个路径可能会有不同,以您机器中的为准。

 

安装过程中可能会遇到下面问题
/usr/local/src/memcache-2.2.5/memcache.c:2245: error: too few arguments to function ‘zend_list_insert’
遇到这个问题在执行完phpize后,找到memcache.c中的所以
 zend_list_insert(pool, le_memcache_pool);
改成
zend_list_insert(pool, le_memcache_pool TSRMLS_CC);

相关文章:

  • 2022-02-11
  • 2021-06-26
  • 2022-12-23
  • 2022-01-19
  • 2021-08-10
  • 2021-11-01
  • 2021-08-17
  • 2022-02-16
猜你喜欢
  • 2022-02-02
  • 2021-07-12
  • 2022-01-13
  • 2021-07-16
  • 2021-08-20
  • 2022-03-01
  • 2021-12-14
相关资源
相似解决方案