在Windows2000使用IIS搭建Discuz!2.0论坛

在Windows2000使用IIS部署远古Discuz!论坛步骤


前期准备

需要准备的软件

PHP4.0.6
MySQL4.1
Discuz!本体

安装流程

安装IIS

控制面板 -> 添加/删除程序 -> 添加/删除Windows组件
选择Internet信息服务

需要Windows2000安装光盘

安装MySQL4.1

mysql-essential-4.1.21-win32.msi

一路下一步,无需特别操作
root密码自定义

安装完成后进入MySQL 创建数据库

CREATE DATABASE discuz;

确认数据库创建

SHOW DATABASES;

预期的输出:


|discuz |


安装PHP

php-4.0.6-Win32.zip
解压文件到C:\php (自定位置)

将C:\php 添加到环境变量Path

编辑php.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[PHP]
核心修改点

...
;extension=php_ming.dll
extension=php_mssql.dll ;启用这两个拓展
;extension=php_oci8.dll
...
;extension=php_sybase_ct.dll
;extension=php_yaz.dll
extension=php_zlib.dll
...

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
' at MYSQL_PORT.
mysql.default_port =3306

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =localhost

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =root

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo cfg_get_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =123456 ;你的SQL root账户密码
...


部署Discuz!

  1. 将Discuz!文件复制到 C:\Inetpub\wwwroot (需要删除wwwroot内的文件)
  2. 在 wwwroot C:\php C:\WINNT 中给IIS用户添加权限

文件夹属性 -> 安全 -> 添加 -> Internet来宾账号 (IUSR_XXXXX)添加权限

  1. 在IIS中添加PHP

运行 %SystemRoot%\system32\inetsrv\iis.msc
默认Web站点 -> 属性 -> 主目录 -> 应用程序设置 -> 配置 -> 应用程序映射 -> 添加
可执行文件 C:\php\php.exe
拓展名 .php
全部动作
全部勾选 ->确定
返回到属性->文档 在默认文档添加index.php -> 确定
返回到属性-> 目录安全性 -> 勾选匿名访问,取消勾选集成Windows验证 ->匿名访问 编辑-> 勾选允许IIS控制密码 -> 确定

  1. 配置discuz
    在Internet Explorer中打开 http://locathost/install.php
    按照提示操作
    或者编辑config.php

核心配置
$dbhost = ‘127.0.0.1’
$dbuser = ‘root’; //建议新建单独的账户,不建议使用root账户
$dbpw = ‘你的数据库密码’;
$dbname = ‘discuz’ //保持默认
$dbminemail = ‘admin@domain.com’; //保持默认

全部配置好后重启IIS服务 cmd: iisreset


附搭建好的截图一张:

Discuz!2.0


在Windows2000使用IIS搭建Discuz!2.0论坛
https://blog.knvbepr.top/2026/04/16/在Windows2000使用IIS搭建Discuz-2-0论坛/
作者
knvbepr
发布于
2026年4月16日
许可协议