php+apache+mysql环境搭建

这几天了解了一下网站开发,发现挺有意思的,因此想搭建个环境,由于第一次接触挺陌生的,后面发现整个过程并没有想想中那么复杂,顺手做个记录:

一、下载三个安装包

下载php压缩包:http://windows.php.net/download/#top
下载apache2.4压缩包。访问 Blackdot.be ::Apache64-bitBinaries,点击下方的链接httpd-2.2.13-win64.rar,下载 Apache64-bit的压缩包。或csdn下载压缩包。

下载mysql镜像,按步骤安装。

二、安装过程说明

(1) 关于php压缩包,只需下载并解压即可。
(2) 关于apache包,安装详细步骤:

  1. 将压缩包解压到本地硬盘。例如我存放在 D:/Web/Tool/httpd-2.2-x64。

  2. 以管理员身份运行 DOS Command(Runasadministrator),进入D:/Web/Tool/httpd-2.2-x64。

  3. 首先执行 httpd -k install:

  D:\Web\Tool\httpd-2.2-x64\bin>httpd -k install

  Installing the Apache2.2 service 

  The Apache2.2 service is successfully installed.

  Testing httpd.conf.... 

  Errors reported here must be corrected before theservicecanbestarted.

  httpd: Syntax error online35ofD:/Web/Tool/httpd-2.2-x64/conf/httpd.conf:

  ServerRootmust be a valid directory

  在执行 httpd -k install 的时候,显示 The Apache2.2serviceissuccessfullyinstalled 表明已经安装成功。

  然后的Testinghttpd.conf有可能会出错,例 ,安装时报了ServerRoot must be avaliddirectory,不用理会。回头自己手工编辑httpd.conf, 将ServerRoot指向正确的目录即可。

  4. 修改 httpd.conf 完成之后,执行 httpd -k start:

  D:\Web\Tool\httpd-2.2-x64\bin>httpd -k start

  D:\Web\Tool\httpd-2.2-x64\bin>

  如果没有提示错误,则表明启动成功。

  当然你也可以执行完第2步之后,先将 httpd.conf 文件改好,再执行 httpd -k install和httpd-kstart。


(3)mysql镜msi下载后,安装很简单,顺序安装即可。网上有教程或传智播客视频有讲到。

三、注意:

安装过程中遇到了一个问题,即让apache载入php处理模块时出错:

LoadFile "D:/***/php/php5ts.dll"
LoadModule php5_module "D:/***/php/php5apache2_4.dll"
PHPIniDir "D:/***/php"
AddType application/x-httpd-php .php .html .htm
这个问题找了好久,后来发现先运行php.exe文件,马上系统出现“无法启动此程序,因为计算机中丢失MSVCR110.dll尝试重新安装该程序”,因此按照

http://jingyan.baidu.com/article/4f7d57129fa86e1a201927de.html的提示,重装了VC,加载成功!


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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值