当前位置: 首页 > 图文教程 > 操作系统 > Windows > Windows XP上安装配置 Apache+PHP+Mysql+Zend

Windows
活用Windows Server 2008系统的几种安全功能
有备而来 让系统VPN连接顺风顺水
强化Windows Server 2008下的打印管理
Windows Storage Server 2008 (x64)BT下载
Windows Server 2008下的网络排错
Server Core上部署IIS7全程攻略
Windows Server 2008脱机文件配置攻略
用组策略保护Windows Server 2008系统安全
高效管理Windows Server 2008的卷影副本
Windows Server 2008 R2中IIS 7.5的改进
众OEM厂商助阵微软推Foundation版服务器系统
使用Windows Server 2008的WDS部署客户端系统
Windows Server 2008制作密码重设盘
扫清Windows Server 2008共享障碍
详述Windows Server 2008安全部署的六个方面
借道IIS搭建企业内部Web方式文件共享平台
新品分析:Windows Server 2008 Foundation
巧用Windows Server 2008的NPS策略
Windows Server 2008故障转移群集简介
微软WSUS 3.0安装配置详解

Windows XP上安装配置 Apache+PHP+Mysql+Zend


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-16   浏览: 441 ::
收藏到网摘: n/a

所需软件:
apache_2.0.58-win32-x86-no_ssl.msi >>>>>>>>>>>>>>http://archive.apache.org/dist/httpd/ 各个版本都有
php-5.1.6-Win32.zip
ZendStudioServer-5.1.0a-Windows-i386.exe
mysql-5.0.19-win32
phpMyAdmin-2.9.1

安装
Apahce+PHP+MySQL安装配置
1. 安装apache_2.0.58-win32-x86-no_ssl ,根据需要按提示设置程序安装路径(我的路径是d:/usr/)。安装完成以后,如果对APACHE目录进行移动,那么apache2下面的参数是必须改的, 修改apache配置目录CONF下的配置文件httpd.conf,本例为d:/usr/apache2/conf/httpd.conf
(1)ServerRoot:apche的程序目录(本例是d:/usr/apache2)
(2)ServerAdmin:服务器管理员的E-MAIL
(3)port:服务端口,默认80
(4)ServerName:计算机的网络标识,必须和实际一致,否则可能会出现一些想不到的问题
(5)DocumentRoot:默认的网页文件目录(本例是d:/usr/www)
(6)DirectoryIndex:默认页面,添加 php支持,(本例如下)
DirectoryIndex index.html index.htm index.php index.php3 index.php4
(7)ScriptAlias(脚本别名),CGI程序的目录
ScriptAlias /cgi-bin “d:/usr/apache2/cgi-bin”
2. 安装php-5.1.6-Win32解压,解压的路径自定义(本例为d:/usr/php5)。
3. 配置PHP和Apache,使之能解析php程序。
PHP配置:
将PHP目录中的“php.ini-dist”改名“php.ini”,并对
php.ini修改如下:
(1) doc_root:和APACHE的HTDOCS一致,本例为d:/usr/www
(2) extension_dir 本例为 d:/usr/php5/ext
(3) include_path 本例为d:/usr/php5/includes
(4) 去掉extension=php_mysql.dll前边的分号,并拷贝php目录下的LIBMYSQL.DLL文件到c:\winnt\system32下
Apache配置:
在APACHE配置文件最后添加以下语句,用以支持php程序:
ADDlanguage zh-cn .cn
defaultlanguage zh-cn
AddDefaultCharset GB2312
ScriptAlias /php/ "d:/usr/php5/"
LoadFile d:/usr/php5/php5ts.dll
LoadModule php5_module d:/usr/php5/php5apache2.dll
PHPINIDir d:/usr/php5/php.ini
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
以上添加内容目录部分和实际不一致的自行修改
4.重新启动Apache服务器,用编辑器编写如下语句:
<?
phpinfo();
?>;
保存文件名为“test.php”到用户主目录(本例为d:/usr/www)目录,然后打开浏览器,浏览:http://localhost/test.php,出现PHP基本信息就说明配置成功。
5. 安装MySQL-5.0.19-win,一直按”next”就安装成功了,然后在C:\mysql\bin目录执行” winmysqladmin.exe”,出现mysql的初始信息面,表示安装成功。
6、安装phpMyAdmin
解压phpMyAdmin-2.6.0-pl2.zip到一目录,本例为d:/usr/phpMyAdmin,进入该目录配置文件config.inc.php
修改$cfg['PmaAbsoluteUri']为http://localhost/phpMyAdmin
修改$cfg['blowfish_secret'] = 'admin';
修改$cfg['Servers'][$i]['auth_type']= 'cookie';
修改$cfg['Servers'][$i]['user']为MySQL用户
修改$cfg['Servers'][$i]['password']为MySQL口令
以上是phpMyAdmin配置的基本内容,其他配置根据需要进行
编辑apache配置文件httpd.conf在最后加入以下语句:
php_admin_flag engine on
php_admin_flag safe_mode off
Alias /phpMyAdmin "d:/usr/phpMyAdmin"
;
DirectoryIndex index.php
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir none
php_admin_value open_basedir "d:/usr/phpMyAdmin"
;
以上目录路径部分根据实际需要进行修改。
7、测试apache+php+mysql
在ie地址栏输入http://localhost/phpMyAdmin如果出现phpMyAdmin信息说明配置成功。
8、最后安装ZendStudioServer-5.1.0a-Windows-i386.exe