找回密码
 立即注册
搜索
查看: 485|回复: 6

IIS服务器完全配置,IIS实现ASP,CGI,PERL和PHP+MYSQL

[复制链接]

58

主题

814

回帖

1163

积分

金牌会员

积分
1163
发表于 2002-4-28 17:24:14 | 显示全部楼层 |阅读模式
IIS服务器完全配置 现在我们要使IIS实现ASP,CGI,PERL和PHP+MYSQL

所需软件(都要是For  w i n d o w s 的):
ActivePerl、PHP、MYSQL
---------------------------------------------------------------------------------------------
一.ASP支持:

不用说了吧,什么都不用做,本身就支持ASP运行。

二.CGI,PERL支持:

1.安装ActivePerl
运行下载的ActivePerl一步一步安装(注意:安装路径请选择到根目录的/usr/下(默认是perl),这样对以后调试程序省很多事)

2.配置IIS
打开"Internet 信息服务"(在'管理工具'里),点开默认站点的属性,

选择 "主目录" 选项卡,然后点 "配置(G)...",弹出对话框:

然后 "添加(D)" :

推荐" c \usr\bin\perl.exe" 记得一定要在后面加上" %s %s ",不然没法执行cgi的,确定后。用同样的方法添加扩展名.pl,:  

现在你的IIS已经支持cgi,perl了!

三.PHP、MYSQL支持:

1.安装PHP和MYSQL
运行下载的PHP和MYSQL一步一步安装就行了(装到哪里都行,一般现在网上流行的都是安装过的PHP,没有安装程序,你只需要把下载的压缩包解压缩出来就行了,放到如: c \php下)

2.PHP支持:

2.1 拷贝php目录下dlls文件夹里所有文件到 c \ w i n d o w s\system32下

2.2配置IIS:和刚才配置cgi一样,添加.php :

完成后

最后,:

这里的 "执行权限" 该成:"脚本和可执行文件" 然后确定ok!
现在你的IIS已经完全支持PHP+MYSQL了

注:MYSQL不许任何设置,直接安装即可

简单吧......过去的很多文章都写得太复杂,而且不必要的步骤太多!接下来就看你的了!

58

主题

814

回帖

1163

积分

金牌会员

积分
1163
 楼主| 发表于 2002-4-28 20:16:19 | 显示全部楼层
请等一会儿,我给你找找...
回复

使用道具 举报

58

主题

814

回帖

1163

积分

金牌会员

积分
1163
 楼主| 发表于 2002-4-28 21:14:25 | 显示全部楼层
回复

使用道具 举报

139

主题

2725

回帖

3901

积分

论坛元老

积分
3901
发表于 2002-4-30 23:34:50 | 显示全部楼层
这个内容不错,建议版主能够为这些贴子建立精华区。方便大家查找。
回复

使用道具 举报

58

主题

814

回帖

1163

积分

金牌会员

积分
1163
 楼主| 发表于 2002-5-1 04:09:47 | 显示全部楼层
谢谢支持!!!:)
回复

使用道具 举报

43

主题

917

回帖

1361

积分

金牌会员

积分
1361
发表于 2002-5-12 13:33:07 | 显示全部楼层
Installing Apache, PHP, and MySQL
This is a beginner's guide to installing and configuring the Apache web server, PHP, and MySQL on a Windows platform.

Installing Apache
The latest version of the Apache web server can be downloaded from http://httpd.apache.org/.

Install Apache by double-clicking on the Apache msi file (e.g. apache_1.3.22-win32-x86.msi).

Edit the file httpd.conf in the folder "C:\Program Files\Apache Group\Apache\conf". Change the directive DocumentRoot to point to "C:/WebRoot". This folder (i.e., WebRoot) contains your web documents (e.g., HTML files).

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/WebRoot"

# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/WebRoot">

Restart the Apache server (Start:Programs:Apache HTTP Server:Control Apache Server:Restart).

You should now see the index.html file you place in C:\WebRoot when you point your browser to http://localhost/.

Installing PHP
The latest version of PHP can be downloaded from http://www.php.net/.

Install PHP4 by simply unzipping it into a new folder named "C:\Php4Win".

Configuring PHP4 consists of changing a few lines in a text file, renaming it and copying it and another file into the Windows directory.

Copy the file C:\Php4Win\php.ini-recommended to php.ini. Open this php.ini file with a text editor and change the doc_root and extension_dir lines so that they read as follows:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path        = ".;C:\WebRoot"
extension_dir        = "C:\Php4Win"

Then move the two files php.ini and php4ts.dll to C:\Windows or C:\WinNT, depending on your Windows flavour. Voila, PHP is now configured.

Although PHP is itself configured, we still will not be able to access it through the Apache server, as Apache has only so far been configured to read static HTML pages. We still need to tell Apache Server what to do when it encounters embedded PHP script in web pages.

Where the httpd.conf file talks about PHP and AddType, add the following lines:

    ScriptAlias /php/ "C:/Php4Win/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"

Restart the Apache server (Start:Programs:Apache HTTP Server:Control Apache Server:Restart).

Now create a one-line test PHP file called "c:\WebRoot\phpinfo.php" with the following contents:

<? phpinfo() ?>

Then open your browser and go to: http://localhost/phpinfo.php You will see a whole bag full of info on your PHP installation.

To use additional *.dlls, put them in C:\Php4Win\ and uncomment their entry in this block of your php.ini file:

;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
...

Installing MySQL
The latest version of the MySQL can be downloaded from http://www.mysql.com/.

Unzip the MySQL distribution, and run Setup.exe. Choose default options through the installation process.

Run winmysqladmin.exe in folder C:\mysql\bin. This starts up the MySQL server. (You will now see mysqld running if you check in the Task Manager)

Create the file c:\WebRoot\testmysql.php with the following content:

<h3>Click on refresh to add entry to database</h3>
<?
   mysql_connect("localhost");
   mysql_create_db("MyFirstDB");
   mysql_select_db("MyFirstDB");
   // make a table
   mysql_query("create table MyFirstTable(firstName VARCHAR(25), lastName VARCHAR(25))");
   mysql_query ("insert into MyFirstTable(firstName, lastName) VALUES ('Tee', 'Tester')");
   // show what is in the table
   $result = mysql_query ("select * from MyFirstTable");
   while($row = mysql_fetch_array($result)) {
      print ("Added record: " . $row["firstName"]." ".$row["lastName"]."<br/>\n");
   }
   mysql_close();
?>

Then open your browser and go to: http://localhost/testmysql.php. Each time you refresh the page, you will see that another record has been added to the database.

Installing MySQLFront
MySQLFront provides a simple interface to access MySQL databases. The latest version of MySQLFront can be downloaded from http://anse.de/mysqlfront/download.php. Install by running the EXE file.

You might want to verify the database entries created in the test phase of MySQL installation using MySQLFront.

Enjoy.



--------------------------------------------------------------------------------

[email protected]
Sat Feb 23 21:44:14 NZDT 2002
回复

使用道具 举报

43

主题

917

回帖

1361

积分

金牌会员

积分
1361
发表于 2002-5-12 13:35:46 | 显示全部楼层
this is our lecture note on how to install software.  I have install all this at home and do the assignment.  I hope it can help.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海浩社区

GMT+8, 2025-9-18 07:06 , Processed in 0.089181 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表