doc

aboardarmΔιακομιστές

4 Δεκ 2013 (πριν από 3 χρόνια και 10 μήνες)

119 εμφανίσεις

http://www.razorx.com/tutorials/IISonXPPro/




RazorX
-
>
Tutorials



Overview:

This tutorial shows you how to easily install and set
-
up
Microsoft's

IIS 5.1

web server o
n the
Windows XP Professional

operating system for use as a local or personal web server (web development
environment) to process document requests. It also shows you how to configure the document serving order
(index.htm, index.html, default.htm, etc.) an
d how to complete your installation with a basic ASP test script.

Also if you are interested in setting up PHP to run on your IIS server, a link to PHP installation and a script test

is available at the end.


Which version of the XP operating system do I

need to install IIS and why should I install IIS?





IIS

is Microsoft's acronym for
I
nternet
I
nformation
S
erver. IIS is a suite of tools and
services for creating, managing, and deploying a web server. The version that ships with XP
Pro is meant to be used for personal development or for up to ten people

using it as an
Intranet, for file sharing, printers, etc. according to the
Microsoft ULA for XP Pro
.

As a
web developer you need a web server for your development environment. You can develop
with a remotely hosted server, but it's much faster, and safer to create applications and code
locally. Web
-
based scripting can be created in progra
mming languages such as: ASP, .NET,
PERL, PHP, Python, JSP, etc. With the appropriate document extension and page
delimiters, the server will recognize and parse (run through) the programming code written
within that particular document and perform the dir
ected instructions from the code. For this
type of processing, also called server
-
side processing, you need a web server. Since IIS 5.1
is not a full scale server, the limited functionality of its built
-
in IIS will prevent you from
doing advanced functions

that you can only do with a full scale server like Windows Server
2003.

If I have the XP Home Edition, can I install IIS using it?


The answer
is no. The
XP Home Edition

does not ship with the IIS components. You will
need the XP Professional Edition to set up and utilize the IIS 5.1 server.








Let's get started installing IIS:


The Internet Information Server (IIS) is not installed by defau
lt with a standard Windows XP Pro installation.
You will need your original Windows XP Pro CD when prompted to install IIS, and you must be able to log in
under a user account that has administrator privileges. Go to
Control Panel

-
>
Add or Remove Programs

-
>

Add/Remove Windows Components
.




At
the
Windows Components

panel, select the Internet Information Servicess (IIS) checkbox, and then hit
Next
.




After you select the
Next

button, unless X
P was installed from a network, you will be prompted for the original
Windows XP Professional CD. Insert the CD and continue.


Once installation has
completed, point a browser to
http://localhost

or
http://127.0.0.1

With a successful
install, you should see the page below... easy cheesy wasn't it? Rock'in! Way ta go playa! You can also access
your server home page if you know your compute
r's IP address or computer name. From a Command Prompt
you can type ipconfig or ping localhost to find out that info if you are curious. Before we conclude, we need to
do a few more things. Next we need to know how to configure and control the default docu
ment serving order
and create our own server home page. Scroll on down for this next step.


Let's configure the default document serving order and crea
te our own server home page. Go to
Control Panel

-
>
Administrative Tools

-
>
Internet Information Services
. Expand the local computer directory, then right
click on
Default Web Site

and select
Properties

from the cascade.



After the
Properties

panel opens, select the
Documents

tab. In the
Default Document

listing box use the
Add

button to add index.htm and index.html. Now use the up and down arrow but
tons on the left side to reorder the
listing. Place the index.htm and index.html at the top and either move down or remove the iisstart.asp listing.
Make sure you remember to hit the
Apply

button. Now whenever you place an index.htm in any folder, the web
server will know that it's the default document and if available, it will serve it first in the directory.


Using Notepad or Dreamweaver, just write a
simple
index.htm

test document and then save it into your
C:
\
Inetpub
\
wwwroot
directory.

<html>

<head>

<title>Home page test</title>

</head>

<body>

<div align="center">Cool! My own server home page.</div>

</body>

</html>

With a browser navigate to
http://localhost

You should now see your
index.htm

test page.


For our last lesson we will put together a
nodoubt.asp

(Active Server Page) test page. Using Notepad or
Dreamweaver, write the following and then save it into your
C:
\
Inetpub
\
wwwroot
\

directory.

<html>

<head>

<title>A
SP page test</title>

</head>

<body>

<div align="center">

<% Response.Write("My ASP test page works. Were there any doubts?") %>

<br>

<br>

<% response.write(Request.ServerVariables("SERVER_SOFTWARE")) %>

</div>

</body>

</html>

With a browser, navigate to
http://localhost/nodoubt.asp

You should now see your
nodoubt.asp

page. When
the server sees the
.asp

extension
, it knows to run through the test page and process any code surrounded by <%
%> delimiters before releasing the page to the browser.
Special note:

The last version of ASP was version 3.0,
and the next generation has now moved to ASP.NET, but it's still us
eful to understand how to use and write in
ASP 3.0. Once you have a firm grasp of ASP 3.0 you can then move on to ASP.NET.


Well that's it! Now you know

how to install your own IIS server, change the default document serving order, and
create a server home page and basic .asp test page. It's important as a web developer to know and understand all
these things, and it's much faster to develop and test your

scripts and applications on a local machine rather than
a remote one. You are well on your way to saving the Internet with your superior web code and flashy web skills.




Installing PHP for IIS:


Oh yeah, did you know you can also run
.php

scripts with your IIS server? I know it's mind
-
blowing, but it's true.
See this next section for a step
-
by
-
step on
how to set
-
up PHP for your IIS server.



What are the different versions of IIS?

IIS 1.0
-

Windows NT 3.51 Service Pack 3

IIS 2.0
-

Windows NT 4.0

IIS 3.0
-

Windows NT 4.0 Service Pack 3

IIS 4.0
-

Windows NT 4.0 Option Pack

IIS 5.0
-

Windo
ws 2000

IIS 5.1
-

Windows XP Professional

IIS 6.0
-

Windows Server 2003

IIS 7.0
-

Windows Vista 2006



What are the different versions of ASP?


ASP 1.0
-

(distributed with IIS 3.0) in December 1996

ASP 2.0
-

(distributed with IIS 4.0) in September 1997


ASP 3.0
-

(distributed with IIS 5.0) in November 2000

ASP.NET
-

(Microsoft .NET platform) in January 2002

ASP.NET
-

version 2.0 arrived in November 2005



Useful external links:


http://en.wikipedia.org/wiki/IIS



http://www.w3schools.com/asp



http://www.asp.net



http://en.wikipedia.org/wiki/Active_Server_Pages



http://www.w3sc
hools.com/php



http://www.php.net



http://en.wikipedia.org/wiki/Php



Disclaimer: RazorX holds no responsibility or legal claims over the contents of this tutorial. As a direct or indirect result

of this information if any damage
s
hould happen to your computer or network, it is understood that no support will be given by RazorX. Ultimtely you are resposn
sible for evaluating any
and all material and you are responsible for consulting your computer or software documentaion before foll
owing any of these instructions for
modification or installation on your system.