PHP Novice installs MONGO for the first time

Source: Internet
Author: User
Tags zend

Here are the steps for me to walk a novice PHP for the first time to install the MONGO module:

1. First select the appropriate version of the MongoDB expansion pack download from the Internet;

2. Unzip the expansion pack and enter the unzip directory;

TAR-ZXF mongo-1.4.1.tgz

CD mongo-1.4.1

3. Execute phpize in the mongo-1.3.2 directory with the following command: (Note: This tool is a tool for adding extensions to PHP, my phpize location is/www/php/bin/phpize)

/usr/local/php/bin/phpize

Note: Ken can make the following error:

Configuring for:

PHP Api version:20041225

Zend Module Api no:20060613

Zend Extension Api no:220060519

Cannot find autoconf. Please check your autoconf installation and the

$PHP _autoconf environment variable. Then, the rerun this script

The problem is that M4 and autoconf are not installed

Continue execution: Yum-y Install M4 autoconf generates configure file

4. Execute the following command:

./configure--with-php-config=/usr/local/php/bin/php-config

Note: The –with-php-config parameter needs to specify the location of the Php-config file, not the location of the php.ini file

Creating Libtool

Appending configuration Tag "CXX" to Libtool

Configure:creating./config.status

Config.status:creating config.h

5. Review the configuration information if it is correct, compile and install:

Make&&make Install

The correct compilation execution results are as follows:

Build complete.

Don ' t forget to run ' make test '.

Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20130712/

6. After compiling the installation, add a sentence in php.ini:

Extension=mongo.so

7. Restart PHP-FPM or Web service, view phpinfo, if there is MongoDB, congratulations, the installation was successful. (Source: Programmer)

PHP Novice installs MONGO for the first time

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.