Vous êtes sur la page 1sur 7

By Gordon Knapp

How to install IIS on XP Pro


If you have recently updated to Windows XP Pro, one of your first priorities (as a web
developer) is going to be installing IIS.

XP Pro ships (at the time of writing) with IIS 5.1. This is the server environment you
will be using for developing and testing any ASP pages you have created either by
hand or with the aid applications such as Dreamweaver MX.

Setting up IIS is a relatively painless operation. Just follow the steps below.

1/ Open the control panel (start>settings>control panel) and double click on "Add
or Remove Programs".

2/ Now click on "Add/Remove Windows Components". When the Windows


Components Wizard appears place a tick in the checkbox next to "Internet
Information Services". You can of course expand the tree in order to see what
components go to make up IIS, but leave all the default settings unchanged for the
time being. It's best to get things running properly before you start fiddling.
3/ At this stage you will probably be asked to insert your Windows XP Pro disk into
the CD-ROM drive. "Make it so" .

4/ Windows will run around in circles for a bit before eventually presenting you with
the screen below. Click on Finish.
5/ To make sure that everything is working, go "Start>Run", type in "
http://localhost" and hit the "OK" button.

6/ When you hit OK a couple of screens will open up in your browser. The first tells
you what a clever person you are and explains that you have not set up a default
page yet. Read it, but it's not very interesting. Oh, you may find that none of the
graphics show up on this particular page. That happened to me the first time I
installed IIS. Just right click on where the graphic should be and select "show
picture" from the menu. It only seemed to do this the first time round. Don't ask me
why.
7/ The other page that opens is the "IIS 5.1 Documentation" page. Do yourself a
favour. Stick a thick wad of paper in your printer and print this stuff out for future
reference. You WILL need it.

8/ Now close those pages down and go take a look inside the "wwwroot" folder at
"C:\Inetpub\wwwroot" you will find a couple of ASP files (these are the ones you
just activated when you hit OK in point 5) You will probably find some of those errant
graphic files there as well.
9/ We don't really need these files anymore. However, as I am the kind of person
who never throws anything away "just incase it may come in useful later" I simply
just transferred them to a folder named "came with iis" ....... like I said ....... just
incase.

10/ Those of you who have made previous forays into good old PWS will know that
the "wwwroot" directory is where you put all the web site files you are developing
so that you can test them. IIS basically works the same way, however, it also gives
you the capability to set separate "Virtual Directories" for each web site. I will deal
with creating and configuring "Virtual Directories" in a later tutorial. Right now
though, we are going to build a quick ASP page to test on our newly installed server.

11/ Open "Notepad" and type in the following ......

<%@ Language = "VBScript" %>


<HTML>
<HEAD>
<TITLE> Test My IIS Installation</TITLE>
</HEAD>
<BODY>
<P>
<H1>HELLO WORLD</H1>
<P>
The Time Is <%=Time()%>
<BR>
The Date Is <%= Date()%>
<P>
Hell, This works!!
</BODY>
</HTML>

Now save the file as "test.asp" and put it into the "wwwroot" directory.

12/ Ok, back to the old "Start>Run" routine, type in "


http://localhost/test.asp" and hit the "OK" button.

13/ If whilst following this tutorial your brain was in gear and your fingers were all
glued on in the correct position, you will now see something like this ..........
And that is all their is to it ..... for the time being. Your development web server is
up and running.

Vous aimerez peut-être aussi