To set up the IIS (Internet Information Services) server role on a Windows Server, follow these steps:
Open Server Manager:
Press the Windows key on your keyboard and type "Server Manager" in the search bar. Click on the "Server Manager" application that appears in the search results.
Add Roles and Features:
In the Server Manager dashboard, click on "Add Roles and Features" to launch the Add Roles and Features Wizard.
Select Installation Type:
In the wizard, choose "Role-based or feature-based installation" and click "Next".
Select Destination Server:
Choose the server you want to install the IIS role on. If you're working on a single server, it should be pre-selected. Click "Next".
Select Server Roles:
Scroll down the list of server roles and check the box next to "Web Server (IIS)". A dialog box will appear, listing additional features that are required for IIS. Click "Add Features" to include these features, and then click "Next".
Select Features:
No additional features are needed for a basic IIS setup. However, you can select any other features you want to install at this stage. Click "Next" when you're ready to proceed.
Web Server Role (IIS) Information:
The wizard will display an informational page about the IIS role. Read the information and click "Next".
Role Services:
Here, you can choose which IIS role services to install. The default selection should suffice for a basic IIS setup, but you can add or remove role services according to your requirements. Click "Next" when you have made your selection.
Confirmation:
Review the summary of your selections and click "Install" to begin the installation process. The installation may take several minutes to complete.
Installation Progress:
Monitor the installation progress, and once it's completed, click "Close" to exit the wizard.
Verify IIS Installation:
To verify that IIS is installed and running, open a web browser and navigate to "http://localhost" or "http://[your-server-ip-address]". You should see the default IIS welcome page.
You have now successfully set up the IIS server role on your Windows Server. You can begin configuring your web server and hosting websites as needed.