PHP安装memcache模块

Php安装memcache模块
tar xf tar xf memcache-2.2.7.tgz
cd memcache-2.2.7
/application/php/bin/phpize
./configure --enable-memcache --with-php-config=/application/php/bin/php-config
make
make install
ll /application/php5.3.27/lib/php/extensions/no-debug-non-zts-20090626/
sed -i ‘s#; extension_dir = “./”#extension_dir = “/application/php5.3.27/lib/php/extensions/no-debug-non-zts-20090626/”#g’ /application/php/lib/php.ini

vim /application/php/lib/php.ini
源文件内容,如果使用memcache更改这两项路径
1449 session.save_handler = files
1478 ;session.save_path = “/tmp”

session.save_handler = memcache
session.save_path = “tcp://127.0.0.1:11211?persistent=1&weight=1&timeout=1&retry_interval=15”
extension = memcache.so #最后一行添加
注:
persistent=1 开启持久连接
weight=1 权重
timeout=1 超时时间
retry_interval=15 重试时间

猜你喜欢

转载自blog.csdn.net/bjgaocp/article/details/87933105