Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 7 x64 安裝 Apache 64-bit 完整教學:Blackdot.be 編譯版、httpd.conf 設定、服務註冊啟動

編輯:Win7 系統應用技巧

官方 Apache 僅提供 32-bit Windows 版本。Win 7 x64 環境需使用 Blackdot.be 以 Visual Studio 2005 編譯的 64-bit 版本(httpd-2.2.13-win64.rar)。

安裝步驟

  1. 下載 httpd-2.2.13-win64.rar 解壓至本地(如 D:/Web/Tool/httpd-2.2-x64)
  2. 以系統管理員身分開啟 CMD,切換至 bin 目錄
  3. 執行 httpd -k install 註冊為 Windows 服務(顯示 The Apache2.2 service is successfully installed)
  4. 編輯 conf/httpd.conf 修正 ServerRoot 指向正確安裝目錄(安裝時可能報錯 ServerRoot must be a valid directory,無視繼續手動修正即可)
  5. 執行 httpd -k start 啟動服務,無錯誤訊息即成功

進階技巧

亦可先修好 httpd.conf 再執行 install/start。httpd -k install 會自動建立服務名為 Apache2.2,可在 services.msc 管理。

適用場景

  • Win 7 x64 / Server 2008 R2 開發測試環境
  • 需 64-bit 記憶體空間支援大型 PHP/Python 應用
  • 生產環境建議使用官方支援管道(Apache Lounge 等)

非官方編譯版雖非長久之計,但解決 Win 7 x64 早期無 64-bit Apache 燃眉之急,開發測試完全足夠。

Copyright © Windows教程網 All Rights Reserved