Install MongoDB PHP driver in CentOS 6.x

To use MongoDB in PHP, you are required to install a driver extension to the PHP environment. In CentOS, it’s in fact very straight forward.


Update 2015-March:

This tutorial works for CentOS 6.x, you can also do this by the following command,

You might first need the Remi Repo if you have not, tutorial on how to install that here.

If you use CentOS 7, you can also install by the above command without installing additional repo.


Original Post (Still works, and you will guarantee using the latest version of the mongodb driver):

Prepare the tools to build PHP extensions

This step is extremely easy with yum, but if you want to use the latest version of PHP, this article does not cover that.

Get the latest MongoDB PHP driver source

The source code is hosted in GitHub, you can find it here .

 Build the driver

The following steps are also mentioned in the readme of mongodb php driver

If all went well, the mongo.so should be installed in /usr/lib64/php/modules/
now go to /etc/php.d

Restart Apache to make the change effective

 

Why Learning Android could improve your programming skills

Android is probably the most popular mobile operating system, a lot of programmers join the Android club to be an Android developer and turn their ideas into great apps. While some of you may not be interested in making a mobile app, but I would say you should give it a try. In this article I’ll try to convince you that you can improve your programming skills by studying the Android framework.

It’s simple

By simple, I don’t mean programming in Android is easy. The Google Android team has made it very easy for beginners to get started, just fire up the Eclipse IDE and load the examples and you have your first Android app. Through Android you’ll learn how to organize an app that is so simple to understand, write and deploy. You could apply this in organizing your web application. There’s a lot of good engineering practice in the Android framework. Of course, programming is never easy, if you feel that what you’re doing is easy, you maybe not making something useful!

It’s well documented

Learning Android is a joy. Continue reading