Luckily, this is pretty simple. First we will have to make sure that PECL and PEAR are installed.
Verify them by using these commands:
If everything is fine, then do
sudo pecl install mongo
(we had to install phpize as this was needed. So, yum install php-devel)
(oh, then we had to install “make” as this was missing as well! So yum install make)
Now that everything has been compiled correctly, you will get the following message:
Build process completed successfully
install ok: channel://pecl.php.net/mongo-1.2.12
configuration option “php_ini” is not set to php.ini location
You should add “extension=mongo.so” to php.ini
So, after adding the extension=mongo.so in php.ini file, the final thing to do is to restart the httpd service!!
That is all to it!