http://httpd.apache.org/apache
--------------------------------------------------------------------------------------瀏覽器
--------------------------------------------------------------------------------------測試
--------------------------------------------------------------------------------------spa
--------------------------------點擊後稍等會彈出下載框----------------------------code
下載到指定文件夾下進行解壓,以下get
win+R進入cmd命令框執行以下命cmd
C:\Users\Administrator>cd e:\Apache\Apache24\bin C:\Users\Administrator>e: e:\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?
發現錯誤彆着急,錯誤信息提示我沒有用管理員身份登陸!class
解決辦法:登錄
打開cmd程序的時候以管理員身份運行就好了
正常安裝完畢:Errors reported here must be corrected before the service can be started.
(若該句話後面有錯誤信息,則表示服務安裝失敗,須要先改正錯誤。若沒有,則成功。)service
e:\Apache\Apache24\bin>httpd -k install Installing the 'Apache2.4' service The '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 directory e:\Apache\Apache24\bin>
此時到此結束,能夠在右下角的任務欄中能夠查看到Apache程序-->點擊start啓動便可
這時候你能夠在瀏覽器中輸入http://localhost來測試時候成功,若是不成功,說明本地80端口被佔用,你能夠到 httpd.conf中將全部80的端口改爲8080,再次輸入,若是出現如圖提示,表示安裝成功。