1、官网
http://httpd.apache.org/download.cgi
2、安装
yum install httpd-tools
3、使用
ab [options] [http://]hostname[:port]/path
ab -n 1 -c 1 -p /data/test/postdata.txt -T application/x-www-form-urlencoded "http://127.0.0.1/url"
常用命令
-n:总请求次数(最小默认为1)
-c:并发次数(最小默认为1且不能大于总请求次数,如:10个请求,10个并发,实际就是1人请求1次)
-p:post参数文档路径(-p和-T参数要配合使用)
-T:header头内容类型(此处切记是大写英文字母T)
后面直接写请求路径即可:http://www.test.com/xxx/xxx.html