In order to install IIS 8 on Windows Server 2012, follow the below instructions:
1. Login to your Windows server with the administrator user using with Remote Desktop.
2. Open Server Manager.
3. Under Manage menu, select Add Roles and Features.
4. Select Role-based or Feature-based Installation. Click on Next.
5. Select the appropriate server (We are installing IIS on a local server so keep the local selected by default). Click on next.
6. Select Web Server (Internet Information Service, IIS). Click on next.
7. The default features will be selected on the next screen. No additional features are needed for IIS. Click on Next.
8. Click Next on the information screen.
9. On this screen, you can customize the IIS installations or keep the default settings as it is and then click on next.
10. Click Install
11. On the next screen, you will see IIS installation completed.