CentOS Installation MongoDB and Php-mongo (yum mode)

Source: Internet
Author: User
Tags script php zend

1. Add Yum Source

vi /etc/yum. repos.d/10gen.repo[10gen] name=10gen Repository baseurl=http:/ /gpgcheck=0: Wq

2. Installation

Yum Install mongo-10gen-yuminstall Mongo-10gen

3, Installation Php-mongo

wget http://pecl.php.net/get/mongo-1.2.2.tgztar zxf mongo-1.2. 2 . tgz# CD MONGO-1.2. 2

4. Run phpize to prepare the environment for compiling the extension

#/usr/bin/for:P HP API Version:         20090626Zend Module Api No:       20090626 Zend Extension Api No:    220090626

If you do not have a phpize file, install

Yum Install Php-devel

5. After running, the./configure script is generated, and this time we run the./configure script to configure it. --with-php-config This parameter is the path that tells the configuration script Php-config this program

#./configure--with-php-config=/usr/bin/php-config
 Make  Make Install

6, add a statement in the php.ini

vi /etc/php.iniextension=mongo.so

CentOS Installation MongoDB and Php-mongo (yum mode)

Related Article

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.