MongoDB's official website https://www.mongodb.org, you can download the version you want. Here is my download, installation and start-up
Curl-o-L HTTPS://FASTDL.MONGODB.ORG/LINUX/MONGODB-LINUX-X86_64-3.0.4.TGZTAR-ZXVF mongodb-linux-x86_64-3.0.4.tgz CD mongodb-linux-x86_64-3.0.4mkdir-p/usr/local/mongodbln-s/usr/local/mongodb/bin/mongod/usr/local/sbin/ Mongodmkdir-p/usr/local/mongodb/data
Vi/usr/local/mongodb/config.conf
The content to be edited is as follows
{
Dbpath=/usr/local/mongodb/data
Logpath=/usr/local/mongodb/mongdb.log
port=27017
Fork=true
Logappend=true
}
Mongod-f/usr/local/mongodb/config.conf//Start MongoDB
Let PHP support MongoDB
First, you can download the appropriate expansion pack in Http://pecl.php.net/package/mongo, here is my installation action
Wget-c http://pecl.php.net/get/mongo-1.6.10.tgztar-zxvf mongo-1.6.10.tgzcd mongo-1.6.10/usr/local/php/bin/phpize. /configure--enable-mongo=share--with-php-config=/usr/local/php/bin/php-configmakemake Install
Vi/etc/php.ini
in which to add
[MongoDB]
Extension=mongo.so
and restart PHP-FPM.
MongoDB installation on CentOS and PHP extension MongoDB