1. First download the PHP mongodb extension from this URL to download MongoDB extension source package from Http://pecl.php.net/package/mongo this URL to download MongoDB extension source Package wget/HTTP PECL.PHP.NET/GET/MONGO-1.4.5.TGZ2. Unpacking the installation package tar zxf mongo-1.4.5.tgz3. Go to the Unzip directory, run the Phpize for installation preparation CD mongo-1.4.5/usr/local/php /bin/phpize4. After the installation compiles the above command, the Configure file is generated in the directory using the./configure command for the installation configuration, and then the build is installed using make && makes install, with the following command:./ Configuremake && make install5. Edit adds the following line add MongoDB extension [PHP] under Add extension= mongo.so Restart the Apache container, and then look at the phpinfo and see the contents of MongoDB to indicate that the installation was successful.
PHP's MongoDB extension installation