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