AWStats使用

AWStats是使用perl語言編寫的web log分析工具。

1.安裝

從官網下載tar文件,解壓至/usr/local/awstats/

2.初始化配置

切換目錄至/usr/local/awstats/tools下,執行以下命令:

perl awstats_configure.pl

這個配置腳本執行的過程中,需要用戶回答一些設置問題。

awstats_configure.pl會修改httpd.conf,將"CustomLog /yourlogpath/yourlogfile common"改爲“CustomLog /yourlogpath/yourlogfile combined",log的format改變了。同時將”/usr/local/awstats/wwwroot"設置爲可訪問的apache頁面。

3.更新數據

在/usr/local/awstats/wwwroot/cgi-bin/目錄下,執行以下命令:

perl awstats.pl -config=yoursitename -update

將讀取log文件,運行分析處理程序,並將分析結果存儲在/var/lib/awstats/下。

注:yoursitename是第二步設置的sitename,

注:首次運行時,可能會提示錯誤“不存在/var/lib/awstats”目錄,手動創建這個目錄就好了。

4.生成報告

同上,在/usr/local/awstats/wwwroot/cgi-bin/目錄下,執行以下命令:

perl awstats.pl -config=mysite -output -staticlinks > awstats.yoursitename.html


awstats在統計UV時使用的時訪問主機的ip地址。


參考:http://www.awstats.org/使用說明。


發佈了25 篇原創文章 · 獲贊 10 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章