I am going to create a two tier architecture SharePoint farm.
Follow this article:
Step 1: Install and configure active directory domain services.
Change the System name after installing the Windows Server 2012 operating system.
Provide IP Address like the following:
Click OK.
And restart the computer.
After successful restart open Server Manager.
Click Manage, then click Add Roles and Features.
In this wizard select Role-based or feature-based installation.
Click next.
Select your server pool and click next.
In Server Roles select Active Directory Domain Services.
Click Next,
Click Next,
All done, then click Install.
Installation Succeeded.
After installation go to Server manager, Tools, then Active Directory Domains and Trusts.
In this pop up Click on action - Promote this server to a domain controller,
In this wizard I am going to Add a new forest named TRENSHAREPOINT.COM.
Click next.
Select the forest and domain functional level, I have picked Windows Server 2012. If you are using Windows Server 2008, select in the list.
Provide the password for restoring the directory service.
Click next.
Leave blank and create DNS Delegation.
Click Next,
NetBIOS name automatically generated.
Click Next,
Click Next,
Click Next.
So the wizard is checking for prerequisites.
Prerequisites verification successful.
Click Install.
So the domain controller was successfully installed in your server.
Restart your computer.
Logged in as : TRENSHAREPOINT\Administrator.