php 添加mongodb扩展

PHPMongoDB扩展安装

[root@a5139~]#wgethttp://pecl.php.net/get/mongo-1.3.4.tgz

[root@a5139~]#tarzxvfmongo-1.3.4.tgz

[root@a5139~]#cdmongo-1.3.4

[[email protected]]#/usr/local/php/bin/phpize

Configuringfor:

PHPApiVersion:20041225

ZendModuleApiNo:20060613

ZendExtensionApiNo:220060519

[[email protected]]#./configure–with-php-config=/usr/local/php/bin/php-config

[[email protected]]#make&&makeinstall

Installingsharedextensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

[[email protected]]#ls/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

memcache.somongo.sopdo_mysql.so

[[email protected]]#vi/usr/local/php/etc/php.ini

#加入

extension_dir=“/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/”

#extension=“memcache.so”

#extension=“pdo_mysql.so”

extension=“mongo.so”

[[email protected]]#/etc/init.d/php-fpmrestart

Shuttingdownphp_fpm.done

Startingphp_fpmdone

#探针查看已经支持mongodb鸟!

http://www.iamle.com/archives/1290.html

http://stephenzhao.blog.51cto.com/2515860/668502

相关推荐