1.下載所需安裝包:html
2.解壓到服務器,編譯安裝:apache
安裝中可能遇到的問題1 提示以下錯誤:/mnt/vdd/mod_bw.c: In function 'get_bw_rate':/mnt/vdd/mod_bw.c:567:59: error: 'conn_rec' has no member named 'remote_addr' if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) {這個錯誤是因爲apache2.2 到2.4 api有所改變,詳細以下:http://httpd.apache.org/docs/2.4/developer/new_api_2_4.htmlvim
vim mod_bw.c把全部的remote_ip和remote_addr分別替換成client_ip和client_addrapi
:%s/remote_ip/client_ip/服務器
:%s/remote_addr/client_addr/app
從新執行 apxs -i -c -a mod_bw.c
測試
3.配置httpd.confspa
MaxConnection all 最大鏈接數.net
Bandwidth all 50kb/s 帶寬限制htm
4.重啓服務測試