> Apache安裝包已放入百度網盤,鏈接地址在本文最后 #### 1.下載Windows版本的Apahce安裝包 --- **a. 訪問官網,進入下載頁面** [https://www.apachelounge.com](https://www.apachelounge.com "https://www.apachelounge.com") (apache 休息室) ![](https://img.itqaq.com/art/content/1ce7fd2ee4cc889402a9d6d44f45e415.png) **b. 下載64位的安裝包** ![](https://img.itqaq.com/art/content/179c5e3c0047fa9d57a8532a47867580.png) #### 2. 修改Apache安裝路徑 --- **a. 解壓壓縮包后,復制目錄中的以下文件夾,粘貼到任意目錄** 我是在虛擬機中安裝的Apache,只有一個C盤,我就放C盤了,推薦放在其他盤 ![](https://img.itqaq.com/art/content/d3122bc82291ff44917f7502568f7606.png) **b. 打開Apache配置文件** ![](https://img.itqaq.com/art/content/18f6a59ab45f1d514c2e51dd86565265.png) **c. 修改apache安裝路徑** ![](https://img.itqaq.com/art/content/1f08ded9d91d755af551044a97363a2e.png) **d. 路徑中的反斜線(\\)最好改為正斜線(/)** ![](https://img.itqaq.com/art/content/86bfd711c18064816a52b3ca994d118c.png) #### 3. 安裝Apache為系統(tǒng)服務、啟動Apache服務 --- **特別注意:在Windows10中必須以管理員身份運行命令窗口,Win7則不需要** ![](https://img.itqaq.com/art/content/c7c8437c8abd75d65f13e013bb3862f5.png) **a. 運行安裝apache為系統(tǒng)服務的命令** ``` httpd -k install ``` ![](https://img.itqaq.com/art/content/93e5b6531d37efe7ecd8ad9040fb6a5c.png) **b. 查看系統(tǒng)服務:按下組合鍵 `Windows + R`,輸入 `services.msc`,回車** 點擊啟動即可啟動Apache服務,也可以使用命令啟動該服務 啟動、重啟、停止(在Win10中必須以管理員身份運行命令窗口) ``` httpd -k start httpd -k restart httpd -k stop ``` ![](https://img.itqaq.com/art/content/017dfc199b2e0eab7f2920a01e216e5a.png) #### 4. 測試運行 --- **瀏覽器地址欄輸入`127.0.0.1` 或 `localhost`** ![](https://img.itqaq.com/art/content/a3ece4356055948baad17168e5b05490.png) #### 5. 百度網盤下載 --- 鏈接: [https://pan.baidu.com/s/1CXgps--ke7AZ88hvrQYt2Q](https://pan.baidu.com/s/1CXgps--ke7AZ88hvrQYt2Q) 提取碼: `5eq8`