安装memcache

tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5/
/usr/local/php/bin/phpize (?)
./configure --with-php-config=/usr/local/php/bin/php-config
make
sudo make install

安装Memcache的PHP扩展
1.在http://pecl.php.net/package/memcache 选择相应想要下载的memcache版本。
2.安装PHP的memcache扩展
tar vxzf memcache-2.2.1.tgz
cd memcache-2.2.1
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make
make install
注意:安装完后会出现:Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
3.在php.ini最后加入下面两行,需在END之前

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"

extension=memcache.so

4.重启php
5.用phpinfo();查看memcache 是否安装成功

09-10 09:55