41

I try to install Apache Benchmark using Is there a way to install Apache Bench (ab) without installing apache solutions on my centos but when i run yumdownloader httpd, i get error:

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

What is it? and how can i fixed it?

Edit 1: i try to use Michael Hampton way but i get this errors:

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

1 Answer 1

97

You can discover which package contains the program you want using yum provides:

yum provides /usr/bin/ab

Then you will see that ab is in the httpd-tools package.

And now you can install it:

yum install httpd-tools

Beginning with RHEL/CentOS 7, you can also supply a filename contained within a package, and yum will automatically locate and install the corresponding package.

yum install /usr/bin/ab   # RHEL 7
dnf install /usr/bin/ab   # RHEL 8
5
  • tanx a lot for answer but i get error again .. please check Edit 1 Jun 9, 2013 at 0:46
  • 2
    You excluded some packages, or otherwise trashed your yum configuration. Check the /etc/yum.conf and files in the /etc/yum.repos.d directory for inappropriate exclusions. Jun 9, 2013 at 0:48
  • tanx a lot, its for /etc/yum.conf , that excluded httpd :D Jun 9, 2013 at 0:58
  • 9
    You can also just run sudo yum install /usr/bin/ab
    – KingPong
    Oct 1, 2015 at 15:12
  • 1
    @KingPong solution did the trick.
    – Trying
    Dec 27, 2015 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .