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)