Installation of Centos6.5 MongoDB installation and Php_mongo extension

Source: Internet
Author: User
Tags php mongodb

1. Download the MongoDB installation package
MongoDB's official website: http://www.mongodb.org find the appropriate version to download.
If you have a network, download it directly (CentOS version) and unzip the tarball.

wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.4.tgz && TAR-ZXVF mongodb-linux-x86_64-2.4.4  

2. Installation Preparation

MV mongodb-linux-x86_64-2.4. 4 MongoDB
Cp-r mongodb//usr/local/mongodb

3. Start MongoDB

/usr/local/mongodb/bin/mongod--fork--dbpath=/datas/mongodb/data/--logpath=/datas/mongodb/mongodb.log-- Logappend

4. Download the PHP mongodb extension source

wget http://pecl.php.net/get/mongo-1.4.0.tgz &&  tar-zxvf mongo-1.4.0.tgz  && CD mongo-1.4.0  

5. Run phpize to compile the extended environment, compile

/usr/bin/php-config. /configure--with-php-config=/usr/local/php/bin/php-config && make && make install

6. Change PHP.ini

php.ini file adds a line extension=mongo.so

Installation of Centos6.5 MongoDB installation and Php_mongo extension

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.