在Debian机器上安装的Apache版本

    技术2023-03-27  112

    本文翻译自:Version of Apache installed on a Debian machine

    How can I check which version of Apache is installed on a Debian machine? 如何查看Debian机器上安装的Apache版本?

    Is there a command for doing this? 这样做有命令吗?


    #1楼

    参考:https://stackoom.com/question/1DKk/在Debian机器上安装的Apache版本


    #2楼

    For me this works on Debian 6 (Squeeze): 对我来说这适用于Debian 6 (Squeeze):

    Linux www809 2.6.26-2-xen-686 #1 SMP Wed Sep 21 09:56:47 UTC 2011 i686 GNU/Linux Linux www809 2.6.26-2-xen-686#1 SMP Wed Sep 21 09:56:47 UTC 2011 i686 GNU / Linux

    I had to go to the right path: 我必须走正确的道路:

    /usr/local/apache/bin** $ **./apachectl -v

    ./apachectl: line 71: ulimit: open files: cannot modify limit: Operation not permitted ./apachectl:第71行:ulimit:打开文件:无法修改限制:不允许操作 Server version: Apache/ 2.2.21 (Unix) 服务器版本:Apache / 2.2.21 (Unix) Server built: Dec 17 2011 19:57:53 服务器内置:2011年12月17日19:57:53


    #3楼

    Try it with sudo 尝试使用sudo

    apachectl -V -bash: apachectl: command not found sudo apachectl -V Server version: Apache/2.4.6 (Debian) Server built: Aug 12 2013 18:20:23 Server's Module Magic Number: 20120211:24 Server loaded: APR 1.4.8, APR-UTIL 1.5.3 Compiled using: APR 1.4.8, APR-UTIL 1.5.2 Architecture: 32-bit Server MPM: prefork threaded: no forked: yes (variable process count) Server compiled with.... bla bla....

    #4楼

    我正在使用Red Hat Linux并且以下命令有效:

    httpd -V

    #5楼

    Try apachectl -V: 试试apachectl -V:

    $ apachectl -V Server version: Apache/2.2.9 (Unix) Server built: Sep 18 2008 21:54:05 Server's Module Magic Number: 20051115:15 Server loaded: APR 1.2.7, APR-Util 1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7 ... etc ...

    If it does not work for you, run the command with sudo . 如果它不适合您,请使用sudo运行该命令。


    #6楼

    或者,不那么直接:

    nmap -A localhost -p 80

    Processed: 0.010, SQL: 9