40

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
Mehdi Yeganeh
  • 453
  • 1
  • 5
  • 12

1 Answers1

91

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
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940