3. Install IIS on Windows Server 2008 R2 Core Server
The inclusion of the .NET
Framework on Windows Server 2008 R2 Server Core provides you with
another platform to install web server roles. Like many other roles, you
will use the Deployment Image Servicing and Management (dism)
command-line tool on the server to install the IIS role. Because of the
complexity and the numerous additional roles required, you will want to
add the components separately as you build your IIS server, even though
you can run this all in one command.
After you log on to Server Core, type the following command to install the .NET Framework:
DISM /Online /Enable-Feature
/Featurename:NetFx2-ServerCore
After
the .NET Framework is installed successfully, you then can proceed to
install the IIS role on Server Core. To begin the process, type the
following command. Please note the name of the role, in this case
WebServerRole, is case sensitive. This command will install IIS with all
the default components on Server Core:
DISM /online /enable-feature
/featurename:IIS-WebServerRole
/featurename:IIS-WebServer
To verify the installation and the necessary components, you can run the get-features switch for the dism command, as in dism /online /get-features. You will see a screen similar to Figure 3.
After you run the command, you
will see all the IIS features (enabled or disabled) listed in the
feature list. These are all the role services for IIS, and they all
begin with IIS.
Before you install any
additional features on your IIS server, it's important to install the
prerequisite features. For example, if you want to install ASP.NET on
Windows Server 2008 R2 Server Core, you need to install the following
features: ISAPI Filters, ISAPI Extensions, and .NET Extensibility. When
you are installing these components on a Windows Server 2008 R2 full
server edition, the GUI wizard will handle the prerequisite installation
for you. Figure 4 shows an example of what you will see on a Windows Server 2008 R2 full edition server.
This is not the case for
Server Core; you will need to install the required features prior to
installing the main feature. For example, if you ran the command to
enable ASP.NET, prior to installing the required features, you would see
an error message similar to Figure 5.
The error message will
inform you of the required features you need to install. In the example
of installing ASP.NET on Server Core, you would need to run the
following command prior to installing the ASP.NET feature:
dism /online /enable-feature
/featurename:IIS-ApplicationDevelopment
/featurename:IIS-ISAPIFilter
/featurename:IIS-ISAPIExtensions
/featurename:IIS-NetFxExtensibility
After the command runs successfully, you can then enable the ASP.NET feature by running the following command:
dism /online /enable-feature /featurename:IIS-ASPNET
4. Install IIS on Windows Server 2008 R2 Web Edition
If you purchased Windows
Server 2008 R2 Web edition, you probably purchased this server edition
with the sole purpose of it being a web server for your organization. To
install the Web edition server, you simply need to select the Web
edition on the operating system selection screen, as shown in Figure 6.
The Web edition can be
installed on either a full edition or Server Core. After you install the
Web edition server, then all you need to do is install the IIS role.
What makes the Windows Server 2008 R2 Web edition unique is that the
server contains only two server roles, DNS and Web Server (IIS). When
you go to add the roles on the Web edition, you will see a screen
similar to Figure 7.
Even though you can
install only two roles on the Web edition, IIS will install like IIS on a
Windows Server 2008 R2 full edition server.
To open Server Manager, select Start => Administrative Tools => Server Manager.
In Server Manager, click Roles.
Review the welcome screen, and click Next.
On the Select Server Roles screen, select Web Server (IIS),
On the Server Role services screen, review the notes, and click Next.
Select the necessary role services to support your web application platform, and click Next.
Review the confirmation screen and your selections, and when you are ready, click Install.
Review the summary screen, correct any error messages, and click Close.