Install ApacheBench on centos

Source: Internet
Author: User

In the past two days, we have tested the PHP performance optimization method.

In order to make a stress test and observe the effect, we chose ApacheBench as the stress testing tool. In fact, it is often said that AB.

However, this tool is provided when Apache Web server is installed. Currently, nginx is run on my server. I don't want to install Apache again to use this tool. Therefore, use the following method to install the AB tool separately. Here, record the next step.

 

First install the required software package Apr-util

 

Yum install Apr-util

 

 

Then install a yum toolkit to obtain AB separately.

 

Yum install Yum-utils

 

 

After the above two installations, we started to install AB separately. In fact, we downloaded the RPM package of Apache, decompress the package, and CP came out with the AB tool.

Download the apache rpm package and hand it over to yumdownloader. before downloading the package, we create a temporary directory for storage.

 

Mkdir httpd

CD httpd

Yumdownloader httpd

 

After downloading, We Will unpackage the RPM

 

Rpm2cpio httpd-2.2.3-43.el5.centos.3.i386.rpm | cpio-idmv

 

Finally, copy the AB we used to the/usr/bin directory of the system. Finally, you can delete all the temporary directories.

 

MV usr/bin/AB/usr/bin/AB
CD ..
Rm-RF httpd
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.