Samba 4.1 as Active Directory configuration guide

I have written one more article with the steps to configure FreeIPA server and client which can also act as an alternate to Microsoft Active Directory. And since FreeIPA is a GUI based, it can be a better alternative then Samba4.
In my earlier post I had shown you the steps to install and configure Samba 4.0 but since then the Samba4 developers have upgraded the Samba version from 4.0 to 4.1. I will be releasing my post for upgrading Samba 4 very soon but in the mean time for the new users planning to configure Samba 4.1 in their machine. Please follow the below steps.
You can look out for the pre-requisites before installing Samba 4.1
Samba 4.1 AD OS Requirements
In my case I am using CentOS 6.2 and have verified all the pre requisite rpms and conditions.


Make sure you have python version more than 2.5 installed in your machine

For configuring Samba 4.0 follow this link
Samba 4.0 as Active Directory
In case you are planning to configure a secondary domain controller for your Samba4 and Windows Server 2008 AD
How to configure Secondary Domain Controller using Samba 4


Make sure you don't have any earlier version of Samba installed


Downloading Samba 4.1 package

NOTE: You can download the Samba4 package from their source directory of Samba. BUT using the below command you will download the latest release of Samba4 available. If you want to download a specific version of Samba4. I suggest you to download the package manually.
Automatic download of Samba 4.X

# git clone git:// samba-master

In case you get
-bash: git command not found

In RedHat, fedora and CentOS