码迷,mamicode.com
首页 > 数据库 > 详细

Linux上安装 MongoDB ZK MEMCACHE PHP扩展

时间:2015-12-08 00:36:34      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:

安装mongo扩展:

下载地址:https://github.com/mongodb/mongo-php-driver,下载该源码包

/usr/local/php/bin/pecl install mongo

 

安装zk扩展:

1.安装libzookeeper

cd /usr/local/src/zookeeper-3.4.6/src/c
./configure --prefix=/usr/local/zookeeper
make
make install

2.安装php zk扩展

cd /usr/local/src/
wget http://pecl.php.net/get/zookeeper-0.2.2.tgz 

tar xf zookeeper-0.2.2.tgz
cd zookeeper-0.2.2
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libzookeeper-dir=/usr/local/zookeeper/
make
make install

 

安装memcache扩展:

tar xf memcache-2.2.7.tgz
cd memcache-2.2.7
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config
make
make install

安装redis扩展:

tar xf phpredis-2.2.4.tar.gz 
cd phpredis-2.2.4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install

php.ini文件添加:

extension=mongo.so
extension=redis.so
extension=zookeeper.so
extension=memcache.so
extension_dir = /usr/local/php-5.5.22/lib/php/extensions/no-debug-non-zts-20121212/
使支持短tag
 202 short_open_tag = On

Linux上安装 MongoDB ZK MEMCACHE PHP扩展

标签:

原文地址:http://www.cnblogs.com/aresxin/p/5027844.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!