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)