1.下载
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
--------------------------------点击后稍等会弹出下载框----------------------------
下载到指定文件夹下进行解压,如下
2.安装
win+R进入cmd命令框执行如下命
C:\Users\Administrator>cd e:\Apache\Apache24\binC:\Users\Administrator>e:e:\Apache\Apache24\bin>httpd -k installInstalling the 'Apache2.4' service(OS 5)拒绝访问。 : AH00369: Failed to open the Windows service manager, perhaps you forgot to log in as Adminstrator?
发现错误别着急,错误信息提示我没有用管理员身份登录!
解决办法:
打开cmd程序的时候以管理员身份运行就行了
正常安装完毕:Errors reported here must be corrected before the service can be started. (若该句话后面有错误信息,则表示服务安装失败,需要先改正错误。若没有,则成功。)
e:\Apache\Apache24\bin>httpd -k installInstalling the 'Apache2.4' serviceThe 'Apache2.4' service is successfully installed.Testing httpd.conf....Errors reported here must be corrected before the service can be started.httpd: Syntax error on line 39 of E:/Apache/Apache24/conf/httpd.conf: ServerRoot must be a valid directorye:\Apache\Apache24\bin>
此时到此结束,可以在右下角的任务栏中可以查看到Apache程序-->点击start启动即可
这时候你可以在浏览器中输入http://localhost来测试时候成功,如果不成功,说明本地80端口被占用,你可以到 httpd.conf中将所有80的端口改成8080,再次输入,如果出现如图提示,表示安装成功。