This article illustrates the method of installing Apachebench separately in the CentOS environment. Share to everyone for your reference, specific as follows:
These two days are testing the PHP performance optimization method.
To make the stress test observable, Apachebench was chosen as a stress test tool. In fact, we often say AB.
But this tool was brought in when the Apache Web server was installed, and now my server is running Nginx. I don't want to put Apache in order to use this tool. So in the following way, install the AB tool separately and record the steps below.
First, install the required packages for AB operations Apr-util
Then install a Yum kit, in order to be able to get out AB alone.
The above two installed, we began to install a separate AB, is actually downloaded to the Apache RPM package, and then decompression, the CP out AB tool.
To download the Apache RPM package to Yumdownloader completed, before downloading we create a temporary directory for storage.
mkdir httpd
cd httpd
yumdownloader httpd
After downloading, we unpack the rpm
Rpm2cpio httpd-2.2.3-43.el5.centos.3.i386.rpm | Cpio-idmv
Finally, we use the AB copy to the system/usr/bin directory can be. The final deletion of the temporary directory is all OK.
MV Usr/bin/ab/usr/bin/ab
CD.
RM-RF httpd
I hope this article will help you with your CentOS server configuration.