Windows Server 2008 R2 Enterprise Edition - setup for Web development

This afternoon I setup a machine for the following purposes:

  1. to serve as a test bed for Web development
  2. to serve as an always-available Subversion repository server
  3. to serve as a repository for shared downloads, across all my machines

As time goes by the scope of the server may also change. But for now, this will work just fine.

Choosing an edition

The first step was to install Windows Server 2008 R2. Being able to choose between any of the editions, it was between Enterprise, Standard, and Web. While I began to lean towards Web based upon the edition comparison by technical specification, when I looked at edition comparison by server role, Web dropped out of the race. Since my external host provides an Enterprise edition server, Enterprise is what I finally chose.

Initial setup before disconnecting the (physical) monitor

After a short time, Windows Server 2008 R2 Enterprise edition was installed and ready for configuration, after entering an Administrator password.

The first thing I did was activate Windows, correct the time zone, and change the computer name to something a bit more manageable, which required a restart.

The next step was to configure (checking for updates, but not installing them automatically) and install updates, of which there were 30.

Since I want to ultimately remove the monitor from this change, I enabled remote desktop. Since I've only got the one network connection, I didn't need to tweak it any further.

While I was in System Properties and switched over to the Advanced tab and hit the Settings... button under Performance. I don't care about how it looks, so I switched from "Let Windows choose what's best for my computer" to "Adjust for best performance," which just unchecked all the checkboxes. I now tested connecting in from my Windows 7 Home Premium machine, and sure enough I was able to bump my other machine and remote in.

With that tested, it was time to shut off the machine, unplug the monitor and USB keyboard and mouse, and see if I could remote in.

Success means shutting off services

With the machine correctly booting up, even though it had no monitor, keyboard, nor mouse hooked up, it was time to start optimizing the server by shutting off services.

Print Spooler was the first to be stopped and disabled. And that was about it. At only 470 MB used, that's not too shabby.

Adding server roles - Web server

With Print Spooler disabled it was time to start setting up server roles. I want to start simple, I first selected Web Server (IIS). While I've run through this before, this time I actually read the notes and saw an item about Windows System Resource Manager (WSRM) that "can help ensure equitable servicing of Web server traffice, especially when there are multiple roles on this computer." That sounds like what I'll eventually be doing, so I've made a note to look into this later.

By default a number of role services are selected, and since I know I want to do ASP.NET development, I added that (and the items it requires) and HTTP Redirection, since it's come up before. I end up with the following.

  • Web Server (IIS)
    • Web Server
      • Common HTTP Features
        • Static Content
        • Default Document
        • Directory Browsing
        • HTTP Errors
        • HTTP Redirection
      • Application Development
        • ASP.NET
        • .NET Extensibility
        • ISAPI Extensions
        • ISAPI Filters
      • Health and Diagnostics
        • HTTP Logging
        • Request Monitor
      • Security
        • Request Filtering
      • Performance
        • Static Content Compression
    • Management Tools
      • IIS Management Console

Once the installation was finished successfully (without the need of a reboot), I was successfully able to browse to the site on my Windows 7 machine.

The 'easy button'

With that done, it was time to install Microsoft Web Platform Installer (WPI), also know as the easy button. Since Internet Explorer runs in a high-security mode in Server 2008, I had to download a copy on my Windows 7 machine and copy and paste it over to the Server, via Remote Desktop.

Since Server 2008 R2 doesn't come with .NET Frameworks 3.5 SP 1 or 4 installed, I started with 3.5 SP1. For whatever reason Logging Tools was also selected, but seemingly no download was required.

Surprisingly I didn't have to reboot after installing .NET 3.5 SP1, so I went on to version 4. For whatever reason, this install took a good deal of time (in the double-digits), and since I didn't keep my attention solely on it, missed the restart prompt in the bottom right corner. But, after the restart that was too was finished.

URL Rewrite 2.0, ASP.NET MVC 2, and PHP 5.2.13 were all next (which ended up requiring CGI to be installed as well).

While tempted to install SQL Server Express, I opted to hold off, since I can install something a bit higher-end, depending upon how they compare for what I need.

CollabNet Subversion Server

As I've been doing more and more, I opted to use CollabNet Subversion Server to install Apache and Subversion, which means another copy and paste through Remote Desktop.

The installation steps haven't changed, so I used an older installation guide I had written, turned off update notifications, and restart the server.

As I've grown to expect, once the server was restarted I was able to access port 8080 locally, but not on my own machine, due to firewall settings. After allowing C:\Program Files (x86)\CollabNet\Subversion Server\httpd\bin\httpd.exe (Apache HTTP Server) to communicate through Windows Firewall, that was now working.

Since I install PHP in a previous step I could go ahead and allow Apache to use it, but for now I'm going to keep moving forward and setup my existing (used) repositories.

Subversion security and repositories

Since I've only got one hard drive (at the moment) on the server, in the C drive root I created a new svn_resources directory. Opening cmd and moving to C:\Program Files (x86)\CollabNet\Subversion Server\httpd\bin\ we can access the htpasswd.exe executable. Using the 'official' book as the standard, I entered the following to create an account for my main development machine (an HP Pavilion a6360t).

htpasswd.exe -cm c:\svn_resources\svn-auth-file james-a6360t

After entering my password twice, I now had an authentication file, and I can now add security to my repositories, via updating C:\Program Files (x86)\CollabNet\Subversion Server\httpd\conf\httpd.conf (you may also want to start Apache Monitor and restart the instance).

<Location /svn>
	DAV svn
	SVNParentPath C:\svn_repository
	AuthType Basic
	AuthName "Subversion repository"
	AuthUserFile C:\svn_resources\svn-auth-file
	Require valid-user

I setup my laptop with another account, and with that done it's time to start moving over the repositories. Since I have so many, I focused on just the handful that I'm actively working on, and holding off on the rest.


Next steps

In addition to looking into WSRM, I still need to move my downloads over to the server (which possibly means setting this up with a file server role), adding SQL Server, and possibly adding PHP functionality to Apache ... just in case.