Linux under the PHP installation MONGO expansion steps Tutorial

Source: Internet
Author: User
Tags fpm


MONGO db is a good thing and more and more projects are being used.

The following describes how to install the MONGO extension

Environment

nginx/1.4.4
PHP 5.4.22
MongoDB 2.4.10

Download Extended installation Package

wget http://pecl.php.net/get/mongo-1.4.5.tgz

Compiling the installation

Tar xvf mongo-1.4.5.tgz-c/usr/src
cd/usr/src/mongo-1.4.5/
Phpize
./configure--with-php-config=/usr/local/php/bin/php-config
Make && make install

Configure PHP.ini, add the following two lines

[MONGO]
Extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/mongo.so

Reload PHP-FPM, Nginx

Pkill PHP-FPM
/usr/local/php/sbin/php-fpm
/usr/local/nginx/sbin/nginx-s Reload

Verify that the installation is successful

php-m | grep MONGO
# or view the Phpinfo page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.