我尝试在我的centos上使用
Is there a way to install Apache Bench (ab) without installing apache解决方案安装Apache Benchmark但是当我运行yumdownloader httpd时,我收到错误:
root@local [~/httpd]# yumdownloader httpd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: yum.phx.singlehop.com * elrepo: repos.lax-noc.com * extras: centos.tcpdiag.net * updates: mirror.stanford.edu No Match for argument httpd Nothing to download
它是什么?我该如何修理它?
编辑1:
我尝试使用迈克尔汉普顿方式,但我得到这个错误:
root@local [~]# yum provides /usr/bin/ab Loaded plugins: fastestmirror,security Loading mirror speeds from cached hostfile * base: yum.phx.singlehop.com * elrepo: repos.lax-noc.com * extras: centos.tcpdiag.net * updates: mirror.stanford.edu No Matches found root@local [~]# yum install httpd-tools Loaded plugins: fastestmirror,security Loading mirror speeds from cached hostfile * base: yum.phx.singlehop.com * elrepo: repos.lax-noc.com * extras: centos.tcpdiag.net * updates: mirror.stanford.edu Setting up Install Process No package httpd-tools available. Error: Nothing to do
解决方法
您可以使用yum提供的发现包含您想要的程序的包:
yum provides /usr/bin/ab
然后你会看到ab在httpd-tools包中.
现在你可以安装它:
yum install httpd-tools