centos 下为php添加mongodb扩展

export PHP_AUTOCONF=/usr/bin/autoconf
export PHP_AUTOHEADER=/usr/bin/autoheader
wget http://pecl.php.net/get/mongo-1.2.7.tgz
tar zxvf mongo-1.2.7.tgz
cd mongo-1.2.7
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

//最后在php.ini中加入以下行并重启webserver
extension=mongo.so

查看phpinfo,如出现mongo字样,说明成功了。

回复 (0)

› 尚无评论。

发表评论

允许使用的标签 - 您可以在评论中使用如下的 HTML 标签以及属性。

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

引用通告 (0)

› 尚无引用通告。