When you will set up Active Directory to the server, then this server will act as a DNS server also. So you need to have static IP, and as the main DNS server you need to set the server IP or the localhost IP 127.0.0.1
Then start the ServerManager, there you choose Add roles and features
Then Next on “Before you begin” and “Select installation type”. Click Next again on Select Destination server, if it will be the local server. Then select Active Directory Domain Services .
Click Add Features and Next. On “Features” then Next.
Then Next and Install again.
Once the installation completes, click promote this server to a domain controller or go to the notification and click there promote this server to a domain controller , see the picture below.
Select Add a new forest and then enter the fully qualified domain name for the domain. Then click Next
Enter a password for the DSRM
Then click again Next on “DNS Options ” and “Additional Options”
Two more times Next
And finally, you must click Install
After the installation, the server will restart automatically and you can now log in to the server as domain admin.