Is there a way to install Apache Bench (ab) without installing apache

Solution 1:

On my CentOS 6.2, this worked:

sudo yum install httpd-tools

Solution 2:

Install apr-util(need to run ab):

yum install apr-util

Install yum-utils:

yum install yum-utils

Download httpd an extract ab:

mkdir ~/httpd
cd ~/httpd
yumdownloader httpd
rpm2cpio httpd-2.2.3-43.el5.centos.3.i386.rpm | cpio -idmv
mv usr/bin/ab /usr/bin/ab
cd ~
rm -rf ~/httpd

Run ab:

ab http://google.ru/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0