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