1、下载、安装apache
Apache官方网站:http://httpd.apache.org/download.cgi浏览器
下载安装版本:Windows版本 httpd-2.2.22-win32-x86-no_ssl.msi服务器
安装操做步骤:网络
1 采用默认安装方式,下一步便可,弹出下图,须要填入服务器信息,随便输入一下并发
二、修改安装目录测试
3 安装完成测试检查,访问在浏览器中输入“http://localhost/”或者输入“http://127.0.0.1/”,若是可以浏览到以下图所示:网站
2、使用说明:.net
一、开始--->运行--->cmd,打开命令行,切换至安装目录下bin文件夹,例如个人安装目录以下:命令行
二、开始简单的测试一下本机的服务:ip
输入:D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -k -n 1000 -c 100 h
ttp://localhost/
三、打印出以下信息:
D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -k -n 1000 -c 100 http://localhost/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: Apache/2.2.22 //请求的网站服务器软件
Server Hostname: localhost //请求的网站域名
Server Port: 80 //请求的网站端口号
Document Path: / //请求的网站路径
Document Length: 44 bytes //请求网站的页面大小
Concurrency Level: 100 //并发数
Time taken for tests: 0.828 seconds //请求网站的耗费时间(总时间)
Complete requests: 1000 //请求网站的所有数
Failed requests: 0 //请求网站的失败数
Write errors: 0
Keep-Alive requests: 1000
Total transferred: 339064 bytes
HTML transferred: 44000 bytes //总的传输大小
Requests per second: 1207.55 [#/sec] (mean) //每秒请求数(平均)
Time per request: 82.813 [ms] (mean) //全部并发请求消耗的时间
Time per request: 0.828 [ms] (mean, across all concurrent requests) //每个并发所消耗的时间
Transfer rate: 399.84 [Kbytes/sec] received //网络传输速率
Connection Times (ms) //链接时间
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0 //网络链接状态
Processing: 16 51 25.4 47 156 //网络处理状态
Waiting: 16 51 25.4 47 156 //网络等待状态
Total: 16 51 25.4 47 156
Percentage of the requests served within a certain time (ms)
50% 47
66% 47
75% 47
80% 47
90% 63
95% 141
98% 141
99% 156
100% 156 (longest request)