Apache下载安装


1、下载安装包:
  1)登录httpd.apache.org
  2)点击左侧 download

  3)点击 a number of third party vendors

  4)点击ApacheHaus


  5)在页面中找到你想要的版本,点击下载(x86是32位的 x64是64位的)


2、将压缩包放你想要路径,并解压

3、打开命令行,进入Apache的bin目录 D: cd apache\Apache24\bin
输入命令:httpd -k install 进行安装
出现报错:Installing the 'Apache2.4' service
(OS 5)拒绝访问。 : AH00369: Failed to open the Windows service manager, perhaps you forgot to log in as Adminstrator?
原因是未通过管理员打开命令行,使用管理员打开命令行后,再重新进行安装

4、进入Apache24\bin 目录下,双击ApacheMonitor.exe就启动Apache了
点击start启动时报错:弹出报错框 The requested operation failed
查看端口后,发现80端口未被占用 修改端口为8080,避免干扰
通过 命令行进入Apache24\bin 执行:httpd -t 报错如下:
httpd: Syntax error on line 39 of D:/apache/Apache24/conf/httpd.conf: ServerRoot must be a valid directory
说明httpd.conf文件里的ServerRoot不存在,进入文件后发现:Define SRVROOT "/Apache24" 该路径与Apache实际安装路径不一致
将路径改Apache的实际安装路径 :D:/apache/Apache24
保存文件,退出Apache Service Monitor,重新启动

5、通过浏览器打开 http://localhost:8080 (上面已经将端口号修改)打开成功,则说明安装了

猜你喜欢

转载自www.cnblogs.com/test-chen/p/10289388.html