如何查看Debian机器上安装了Apache的哪个版本?
有这样做的命令吗?
如何查看Debian机器上安装了Apache的哪个版本?
有这样做的命令吗?
当前回答
该命令取决于您的Linux版本如何命名Apache Server。
在Debian和Mac OS上:
apachectl -v
在Red Hat和Amazon的EC2 Linux上使用:
httpd -v
在其他版本的Linux上尝试:
apache2 -v
你可以使用两种不同的标志:
-v # gives you the version number
-V # gives you the compile settings including version number.
如果你想在完整目录下运行命令,比如user3786265,但不知道你的apache位于哪里,使用whereis命令:
whereis httpd
其他回答
对我来说,apachectl -V不起作用,但apachectl fullstatus给了我我的版本。
工作在debian11靶心
/usr/sbin/apache2 -v
对我来说,这适用于Debian 6(挤压):
Linux www809 2.6.26-2-xen-686 #1 SMP Wed Sep 21 09:56:47 UTC 2011 i686 GNU/Linux
我必须走上正确的道路:
/usr/local/apache/bin** $ **./apachectl -v
./apachectl:第71行:ulimit:打开文件:不能修改limit:不允许操作 服务器版本:Apache/2.2.21 (Unix) 服务器构建:2011年12月17日19:57:53
这适用于我的Debian:
$ /usr/sbin/apache2 -v
或者,不那么直接地说:
nmap -A localhost -p