An IIS 7.0 web server can be installed two different ways with Windows Server 2008.
- As part of Core Server mode where IIS 7.0 is installed as one of the Server Roles,
- The normal way through the GUI interface, where IIS 7.0 is installed as one of the Server Roles.
This article will also cover the installation of IIS 7.0 on Windows Vista. In the end I’ll also cover unattended installation of IIS.
On Windows Server 2008, IIS 7 can be installed in two main ways:
- Normal mode (GUI) – with a GUI for management and administration
- Server Core mode – only a command prompt & PowerShell is available for local server for administration, remote management is possible using MMC 3.0 and snap-ins.
The above installations can be automated. This is done using unattended installation and will be covered at the end of the article.
On Windows Vista, IIS can be installed in two ways, through the normal GUI for adding additional Windows Features to Vista, or as part of an unattended installation.
IIS on Windows Server 2008
IIS 7.0 is one of the Windows Server 2008 Server Roles. IIS can be installed through the GUI using the new Server Manager interface after the Windows Server 2008 OS is installed.
Server Manager provides a single dashboard to install or uninstall Server Roles and Features. It also gives an overview of all currently installed Roles and Features. When IIS 7.0 is chosen from the Server Manager, the basic components and services needed for IIS are automatically selected.
Installing IIS 7.0 on Windows Server 2008 is a little different from installing IIS 6.0, but it’s still pretty straightforward using Server Manager.
You can install IIS via Server Manager found in:
Start Menu – Server Manager
(it can also be found under: Start Menu – Administrative Tools – Server Manager)
Select the “Add Roles” under Roles
Select “Web Server (IIS)” on the Server Roles page:
Figure 1: Server Roles selection page
Choose the IIS Services to be installed. In this case ASP.NET is to be installed. Select the services required by your applications:
Figure 2: Role Services selection page
When choosing the above services, you might be prompted with a warning to install some required services for the selection above, if the services are not already installed:
Figure 3: The Wizard warning page
IIS 7.0 is now installed with a default configuration for hosting ASP.NET on your Windows Server 2008:
Figure 4: Installation Results page
Confirm that the web server works using http://localhost:
Figure 5: Default website
Install only the absolutely necessary IIS Services to minimize the IIS installation footprint. This also minimizes the attack surface, one of the benefits of the new IIS 7.0.
Windows Server 2008 can be installed in Server Core mode. Server Core is selected during the initial install of Windows Server 2008.
Server Core mode is a new feature in Windows Server 2008. It’s a low footprint server installation, where only the minimal set of binaries needed to run certain services are installed, e.g. a web server. This means that not even the Windows Shell (GUI) is installed, only a minimal footprint to boot up the server is installed and the administrator is then presented with a command prompt after boot up.
IIS 7.0 is one of the Server Roles that can be installed on Windows Server 2008 running in Server Core mode.
To install IIS 7.0 on a server running Server Core mode, run the following command:
This installs IIS 7.0 with a default, minimal installation.
Currently in Windows Server 2008 (Release Candidate 0) only classic web applications such as ASP and PHP are available in Server Core mode. The following IIS services are not available in Server Core mode:
In Server Core mode administration and configuration of IIS has to be done through the .config xml configuration files or the appcmd.exe command tool. Interfaces such as WMI and COM are also available, remote management is possible using MMC 3.0 and Snap-Ins.
Confirm the installation by copying or creating some .html web pages and put them in the root of the Inetpub folder.
Unattended installation is a way of automating the installation, for consistent and automated installation of IIS 7.0. Automating the installation using unattended scripts is very useful if you need to deploy multiple web servers and want to make sure that each of the web servers is set up with identical components and services.
This is done differently than with Windows Server 2003. In Windows Server 2008 and Windows Vista the tool used for unattended scripts is called pkgmgr.exe. It’s the main component used during unattended installations and it allows you to install or uninstall from a command prompt or scripts. Pkgmgr.exe replaces sysocmgr.exe from Windows Server 2003.
To use pkgmgr.exe, make sure you have administrative privileges on the machine(s).
Run the following command directly from a command prompt or from within a script:
The above command installs IIS 7.0 with all the services available. Choose only the services required by your web applications.
The same command can be packed into an xml file and run pkgmgr.exe with the xml file as a parameter, also from a command prompt:
Here’s a sample of an IIS7_unattend.xml file, which installs IIS 7.0 with the default features:
<?xml version="1.0" ?>
<selection name="IIS-WebServerRole" state="true"/>
<selection name="WAS-WindowsActivationService" state="true"/>
<selection name="WAS-ProcessModel" state="true"/>
<selection name="WAS-NetFxEnvironment" state="true"/>
<selection name="WAS-ConfigurationAPI" state="true"/>
It’s very important that the Windows build version within the xml file (version="6.0.6001.16659") is the full version number of the OS, otherwise the xml file won’t work.
To get the current build number, open properties of the regedit.exe file:
Figure 6: Regedit.exe properties
The build version needed is the Product version listed above.
For more information about installing IIS 7.0 unattended or about the xml syntax used by unattended installations, see the Microsoft IIS website: www.iis.net.
IIS on Windows Vista
IIS 7.0 is also available on Windows Vista, with almost all the features of the full blown IIS 7.0.
Installing IIS 7.0 on Windows Vista is a little different than installing IIS 6.0 on Windows XP, but it’s still pretty straightforward.
You can install IIS via:
Control Panel – Programs and Features – Turn Windows features on or off (found in the task pane).
Select the “Internet Information Services” as show below and go through the dialog boxes.
Figure 7: Windows Features and the selected IIS Features
IIS 7.0 is now installed with a default configuration on your Windows Vista. Confirm that it works using http://localhost.
Figure 8: Default website
Use the Internet Information Services Manager to manage and configure IIS.
If you want to use ASP, ASP.NET or even PHP, install the modules needed to host these pages, this can be done during the install of IIS or afterwards.
IIS 7.0 can also be installed unattended on Windows Vista, as described earlier.
IIS 7.0 on Windows Server 2008 is more flexible in administration and installation.
Installing IIS as part of Windows Server 2008 Server Core is a great feature and can be a nice way of deploying IIS web farms. Hopefully support for .NET (ASP.NET) in Server Core mode will be available in the final release.
IIS 7.0 on Windows Vista is not as limited as IIS previously was in Windows XP. Installing IIS 7.0 on Windows Vista can be very helpful for web developers and sites can easily be copied between Vista and Windows Server 2008.
Overall, it’s quite easy to get up and running with IIS 7.0, either on Windows Server 2008 or Windows Vista.
IIS 7.0 is available in Windows Vista and as part of Windows Server 2008, which can be downloaded as Release Candidate 0 (RC0) version
Additional resources for more information about IIS 7.0: