1. Apt-get php5, php mod lib5 for apache2.
2. Apt-get php-pear (to get PECL) and php-dev.
3. sudo pecl install phpmongo.
4. Restart apache.
1. Follow the steps here. All it involves is download a zip and extract to a folder.
2. Now configure Apache to create a php app using the above the folder.
3. If required change the config.php to set the mongo server information like port, user name and password.
Rock mongo really rocks.