To install Windows server 2008 R2 click this link
To install active directory in the windows server, assign static IP address.
Such as IP Address : 192.168.0.101
Subnet mask : 255.255.255.0
Default Gateway : 192.168.0.101
Preferred DNS Server : 192.168.0.101
To install Active Directory, Type DCPROMO (Domain Controller Promotion) in Run Command With Run as Administrator. Click OK.
To start the installation click on “Next“
Click next to move on
We going to install new domain Controller in new forest please select the option “Create a new domain in new forest” option and click on “Next”
Now we have to provide the name for new domain. It must be FQDN. In our case I used hackingarticles.in as the domain. Please click “Next” after it.
Select forest functional level to Server 2008 R2 to add domain controller of Windows server 2008 R2 or later.
In next window since it’s the first DC we should make it as DNS server too. Leave the default selection and click on “Next“
If the wizard cannot create a delegation for the DNS server, it displays a message to indicate that you can create the delegation manually. To continue, click “Yes“
In next window it will show up the database location. If you want to change it physical location Click browse and do the changes or click on “Next” to proceed.
Choose a Strong Active Directory Restore Mode Password and click next twice to kick off the configuration.
Next window is giving you a brief of the installation. Click on “Next”
Then it will start the installation of the AD. It will take some time to complete.
When its done you will be notified and required to reboot your PC.