Since the module is not included with the default PHP installation, you have to download it from the official repository:
1cd 2mkdir mongo-php-driver 3cd mongo-php-driver 4curl https://codeload.github.com/mongodb/mongo-php-driver/zip/master > mongo-php-driver-master.zip Unzip it
1unzip mongo-php-driver-master.zip 2cd mongo-php-driver-master You need _phpize _to build the module. You can install it from the remi repository:
1wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 2rpm -Uvh remi-release-6.rpm 3yum --enablerepo=remi install php-devel Configure and build
1phpize 2./configure 3make all 4sudo make install Make sure the installation directory is the same as the PHP extension directory by running: