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

Linux 快速查看 Apache 版本:apachectl -v 與指定路徑執行技巧

編輯:系統常見問題解答

環境:CentOS,Apache 安裝於非標準路徑(/opt/httpd/)。

標準指令

apachectl -v

若提示 command not found

直接指定完整路徑執行:

/opt/httpd/bin/apachectl -v

輸出範例

Server version: Apache/2.2.27 (Unix)
Server built:   Apr 5 2014 00:42:59

補充:其他常用查看方式

  • httpd -v(若 httpd 在 PATH 中)。
  • rpm -q httpd(RPM 安裝時查詢套件版本)。
  • apachectl -V(大寫 V)顯示編譯參數、MPM 模組、預設路徑等詳細建置資訊。

掌握指定路徑執行技巧,避免「找不到指令」干擾運維節奏。

Copyright © Windows教程網 All Rights Reserved