1.软件下载
apache2.0.53 http://scmy.downloadsky.com/down/apache_2.0.53-win32-x86-no_ssl.msi
php5.0.3 http://scmy.downloadsky.com/down/php-5.0.3-win32.zip
mysql4.1.10 http://yncnc.downloadsky.com:8080/down/mysql-4.1.10-win32.zip
phpmyadmin2.6.1 http://http://voxel.dl.sourceforge.net/sourceforge/phpmyadmin/phpmyadmin-2.6.1-pl3.zip
2.安装
我喜欢把apache,php,mysql都装到c盘上,目录分别是
c:\apache group\apache2
c:\php
c:\program files\mysql\mysql server 4.1
把phpmyadmin解压到c:\apache group\apache2\htdocs下
3.设置
1)让apache2支持php5
通过 开始菜单>apache http server 2.0.53>configure apache server>edit the apache httpd.conf configuration file来设置文件httpd.conf ,在适当位置加入
loadmodule php5_module "c:/php/php5apache2.dll"
addtype application/x-httpd-php .php
我加在了这
# errordocument 501 /error/http_not_implemented.html.var
# errordocument 502 /error/http_bad_gateway.html.var
# errordocument 503 /error/http_service_unavailable.html.var
# errordocument 506 /error/http_variant_also_varies.html.var
# for php 5 do something like this:
loadmodule php5_module "c:/php/php5apache2.dll"
addtype application/x-httpd-php .php
#
# the following directives modify normal http response behavior to
# handle known problems with browser implementations.
这样php5就以module方式加入了apache
2)让php5支持mysql
(1)将c:\php\php.ini-recommended拷贝到c:\windows下改名为php.ini
找到
;extension=php_mysql.dll
去掉前面的";"
extension=php_mysql.dll
(2)将以下三个文件
c:\php\libmysql.dll
c:\php\ext\php_mysql.dll
c:\php\ext\php_mysqli.dll
拷贝到c:\windows\system32下
重起apache,php5就支持mysql了
3)phpmyadmin的配置
编辑phpmyadmin目录下的config.inc.php,加入root的密码
$cfg['servers'][$i]['auth_type'] = 'config'; // authentication method (config, http or cookie based)?
$cfg['servers'][$i]['user'] = 'root'; // mysql user
$cfg['servers'][$i]['password'] = 'xxxxxx'; // mysql password (only needed
保存,用浏览器打开http:\\localhost\phpmyadmin\index.php,完成对mysql数据库的操作
至此服务器总体设置基本完成,有关安全性等其他设置慢慢再来,