Install AWStats- Free Logfile Analyzer for Site Statistics安裝awstats -免費日誌文件分析儀,用於網站統計

Prerequisite 先決條件

As AWStats is Perl based, a Perl Interpreter need to be installed first to take anvantage of AWStats.作為awstats的Perl是基於, 1的Perl口譯員,必須先安裝採取anvantage的awstats 。 For instruction on how to install Perl in Windows machine, check out教學上如何安裝的Perl在Windows機器,簽出 this article此文章 .

Download AWStats 下載awstats

Download latest stable release of AWStats from下載最新的穩定版本的awstats從 http://www.awstats.org/ . Choose the setup package that ended with .exe extension.選擇安裝套件結束。 exe的擴展名。

Install AWStats 安裝awstats

Launch the AWStats setup file by double clicking on the executable that just has been downloaded.推出awstats安裝文件雙擊就可執行剛才已被下載。

awstats安裝
Click “Next” to continue.單擊“ Next ”繼續。

awstats安裝
Click “I Agree” to continue.點擊“我同意”繼續下去。

awstats安裝
You may want to change the installation folder here.您可能會想要改變安裝文件夾在這裡。 Then click on “Install” to start the installation.然後點擊“安裝”開始安裝。

Setup and Configuration for Apache Web Server 安裝和配置為Apache Web服務器

AWStats installer will automatically launches the awstats_configure.pl script to do several setup actions. awstats安裝程序將自動啟動該awstats_configure.pl腳本做幾個安裝的行動。 If you’re not using the Windows installer, you can find the script in the AWStats tools directory.如果您不是使用Windows Installer ,您可以找到該腳本,在awstats工具目錄。 To execute it use (if location of perl.exe is within your path environment):執行它的使用(如果perl.exe的位置是在您的PATH環境) :

perl awstats_configure.pl的Perl awstats_configure.pl

This is what the script does/asks (you can do all these steps manually instead of running awstats_configure.pl (automatically launch by Windows installer) if you prefer):這是什麼腳本/要求(你可以做的所有這些步驟手動而不是運行awstats_configure.pl (自動發射的Windows Installer )如果您喜歡) :

A) awstats_configure.pl tries to determine your current log format from your Apache web server configuration file httpd.conf (it asks for the path if not found).一) awstats_configure.pl嘗試,以確定您當前的日誌格式從您的Apache Web服務器配置文件httpd.conf中(它要求的路徑,如果未找到) 。 If you use a common log, awstats_configure.pl will suggest changing it to the NCSA combined/XLF/ELF format (you can use your own custom log format but this predefined log format is often the best choice and makes setup easier).如果您使用一個共同的日誌, awstats_configure.pl會建議改變以國家能力自評相結合/ xlf / ELF格式(您可以使用自己的自定義日誌格式,但這個預定義的日誌格式,往往是最好的選擇,使安裝更容易) 。

If you answer yes, awstats_configure.pl will modify your httpd.conf, changing the following directive from:如果您的答案是, awstats_configure.pl將修改您的httpd.conf中,改變了以下指令:

CustomLog /yourlogpath/yourlogfile common customlog / yourlogpath / yourlogfile共同

to

CustomLog /yourlogpath/yourlogfile combined customlog / yourlogpath / yourlogfile結合

See the Apache manual for more information on this directive (possibly installed on your server as www.mysite.com/manual).見Apache的手冊,了解更多的信息關於這個指令(可能是安裝在您的服務器作為www.mysite.com /手冊) 。

B) awstats_configure.pl will then add, if not already present, the following directives to your Apache configuration file (note that the “/usr/local/awstats/wwwroot” path might differ according to your distribution or OS: b )在awstats_configure.pl會,然後添加,如果不是已經存在,下列指示,以你的Apache配置文件(請注意, “在/ usr / local / awstats /在Wwwroot ”的路徑可能有所不同,根據您的分佈或OS :

#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI. #指示添加到您的Apache的配置文件,從而允許使用awstats作為CGI 。
# Note that path “/usr/local/awstats/” must reflect your AWStats Installation path. #注意,這條道路“在/ usr / local / awstats / ”必須反映您的awstats的安裝路徑。
#
Alias /awstatsclasses “/usr/local/awstats/wwwroot/classes/”別名/ awstatsclasses “在/ usr / local / awstats /在Wwwroot /班/ ”
Alias /awstatscss “/usr/local/awstats/wwwroot/css/”別名/ awstatscss “在/ usr / local / awstats /在Wwwroot /的CSS / ”
Alias /awstatsicons “/usr/local/awstats/wwwroot/icon/”別名/ awstatsicons “在/ usr / local / awstats /在Wwwroot /圖標/ ”
ScriptAlias /awstats/ “/usr/local/awstats/wwwroot/cgi-bin/” scriptalias / awstats / “在/ usr / local / awstats /在Wwwroot /的CGI斌/ ”

#
# This is to permit URL access to scripts/files in AWStats directory. #這是允許URL訪問腳本/檔案在awstats目錄。
#

Options None選擇無
AllowOverride None allowoverride無
Order allow,deny為了讓,否認
Allow from all允許從所有

C) if changes were made as indicated in parts A and B, awstats_configure.pl restarts Apache to apply the changes. c )如果作出改變顯示,在A和B部分, awstats_configure.pl重新啟動Apache的應用更改。 To be sure the log format change is effective, go to your homepage.可以肯定的日誌格式改變是有效的,去您的首頁。 This is an example of the type of records you should see inserted in your new log file after Apache was restarted:這是一個例子,該類型的紀錄,您應該可以看到插入在您的新的日誌文件後,重新啟動Apache的是:

62.161.78.75 - - [dd/mmm/yyyy:hh:mm:ss +0000] “GET / HTTP/1.1″ 200 1234 “http://www.from.com/from.html” “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)” 62.161.78.75 -- [房屋署副署長/M M M月/日:小時:分鐘:s s的0 0 00]“獲取/h t tp/1.1”2 0 012 34“h t tp://www.from.com/from.html”, “ m o zilla/4.0(兼容; msie 5.01 ;的Windows NT 5.0 ) “

D) awstats_configure.pl will ask you for a name for the configuration profile file. d )在awstats_configure.pl會問你為一個名稱為配置文件檔案。 Enter an appropriate name such as that of your web server or the virtual domain to be analyzed, ie mysite.輸入一個適當的名稱,如認為您的Web服務器或虛擬網域加以分析,即mysite多。

awstats_configure.pl will create a new file called awstats.mysite.conf by copying the template file awstats.model.conf. awstats_configure.pl將創建一個新文件所謂awstats.mysite.conf複製模板文件awstats.model.conf 。 The new file location is:新文件的位置是:
- For Linux/BSD/Unix users: /etc/awstats. -為L inux/和B SD/ U NIX用戶:在/ e tc/ a wstats。
- For Mac OS X, Windows and other operating systems: the same directory as awstats.pl (cgi-bin). -為M acO SX , W indows及其他作業系統:相同的目錄中a wstats.pl(的C GI斌) 。

E) awstats_configure.pl ends. e )在awstats_configure.pl結束。

Check through the httpd.conf is configured properly according to steps above.檢查通過的httpd.conf配置是否正確,根據上述步驟。 It has been reported that sometime the CustomLog is not changed from common to combined.據報導,一段時間該customlog是沒有改變,從共同的總和。

Additional Configuration at Main Parameters of awstats. mysite .conf 額外的配置在主要參數的awstats 。 mysite多 。設置

A) Change Apache log file directory by: 1 )改變Apache日誌文件的目錄:

Find : LogFile=”/var/log/apache/access.log”找到:日誌文件= “ / var / log /裡的Apache / access.log ”
Replace with : LogFile=”C:/Program Files/Apache Group/Apache2/logs/access_log”取代: =日誌文件的“ C : /程序文件/阿帕奇group/apache2/logs/access_log ”
(Important: The setting is for default Apache installation path. If you change your Apache path, please input accordingly. Note that the directory seperator is /) (重要提示:設置為默認的Apache安裝路徑,如果你改變你的Apache路徑,請輸入相應的。注意到,該目錄分離器是/ )

B) Change log file type (Optional, typically no need to change) b )在改變日誌文件類型(可選,通常沒有必要改變)
Find : LogType=W找到: logtype =瓦特
Replace the value with “W” for analyzing web server log files, “S” for a streaming server log file, “M” for mail log files, “F” for ftp log files.取代的價值與的“ W ”分析Web服務器日誌文件, “ S ”型為流媒體服務器的日誌文件, “男”的郵件日誌文件, “ F ”類為FTP日誌文件。

C) Check if LogFormat has the value “1″ (it means “NCSA apache combined/ELF/XLF log format”) or use a personalized log format if you don’t use combined log format.三)檢查,如果logformat已值“ 1 ” (意思是“國家能力自我評估相結合的Apache /極低頻/ xlf日誌格式” ) ,或使用一個個性化的日誌格式,如果你不需要使用相結合日誌格式。

D) Check if SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).四)檢查,如果sitedomain參數與主域的名稱或內部網路伺服器名稱用來達到該網站分析(例如: www.mydomain.com ) 。

E) If you have several possible name for same site, add list in HostAlias parameter: e )如果您有幾種可能的名稱相同的網站,請新增名單在hostalias參數:

Find : HostAliases=”localhost 127.0.0.1 REGEX[^.*\.myserver\.com$]”找到: hostaliases = “本地127.0.0.1的regex [ ^ .* \ 。 myserver \ 。 com的$ ] ”
Replace with : HostAliases=”yoursite.com localhost 127.0.0.1″取代: hostaliases = “ yoursite.com本地127.0.0.1 ”
(You can include alias names from dynamic DNS accounts such as www.mysite.serveftp.net and etc.) (您可以加入的別名,從動態DNS帳戶,如www.mysite.serveftp.net等)

F) AWStats statistics can be updated from a browser, to provide real-time statistics, by clicking the “Update now” link that appears when AWStats is used as a CGI. f )在awstats的統計資料可以更新從一個瀏覽器,提供實時的時間統計,按一下“立即更新”鏈接時,會出現awstats是用來作為CGI 。 To enable it:使它能:

Find : AllowToUpdateStatsFromBrowser=0找到: allowtoupdatestatsfrombrowser = 0
Replace with : AllowToUpdateStatsFromBrowser=1取代: allowtoupdatestatsfrombrowser = 1

G) Edit ‘awstats.pl’ located in “C:\Program Files\AWStats\wwwroot\cgi-bin\” and change the path on the first line to point to exact location of perl.exe in your system, ie #!C:\perl\bin\perl.exe.克)編輯' awstats.pl '設在的“ C : \程序文件\ awstats \在Wwwroot \的CGI斌\ ”和更改路徑,對第一線,以點的確切位置perl.exe在您的系統,即# !為C : \的Perl \斌\ perl.exe 。

To Maintain Just Single CGI Directory - Optional 要保持公正的單一的CGI目錄-可選

New version of AWStats creates alias directory entries at the bottom of Apache httpd.conf file.新版本的awstats創建別名目錄項在底部的Apache httpd.conf文件。 If you want to have just one CGI executable directory, you have to move the AWStats scripts to existing CGI directory.如果您想只有一個可執行的CGI目錄,你有動議awstats的腳本,以現有的CGI目錄。

The following assume installation in default path.以下假設安裝在默認路徑。

  • Copy ALL files and sub-folders contained within “C:\Program Files\AWStats\wwwroot\cgi-bin\” and paste into your Apache2 web server’s cgi-bin at “C:\Program Files\Apache Group\Apache2\cgi-bin\”複製所有文件和子文件夾中包含的“ C : \程序文件\ awstats \在Wwwroot \的CGI斌\ ”並粘貼到您的Apache2 Web服務器的CGI模式斌在的“ C : \程序文件\阿帕奇組\ Apache2中\的CGI斌\ “
  • Copy ALL files and sub-folders contained within “C:\Program Files\AWStats\wwwroot\icon\” and paste into our Apache2 web server’s icons folder at “C:\Program Files\Apache Group\Apache2\icons\”複製所有文件和子文件夾中包含的“ C : \程序文件\ awstats \在Wwwroot \圖標\ ”並粘貼到我們的Apache2 Web伺服器的圖標文件夾的“ C : \程序文件\阿帕奇組\ Apache2中\圖標\ ”

Edit again the awstats. mysite .conf file, the change the following:編輯再次awstats 。 mysite多 。配置文件,改變如下:

Find : DirIcons=”/icon”找到: diricons = “ /圖標”
Replace with : DirIcons=”/icons”取代: diricons = “ /圖標”

Delete from Apache web server’s httpd.conf the alias directory that has been inserted by AWStats setup program.刪除從Apache Web服務器的httpd.conf中的別名目錄已插入awstats安裝程序。

Optional Setup Section 可選安裝節

Find : DefaultFile=”index.html”找到: defaultfile = “ index.html ”在
Replace with your default index page, only if necessary, ie DefaultFile=”index.php” or DefaultFile=”index.php index.html”取代與您的默認索引頁,只有如有必要,即defaultfile = “的index.php ”或defaultfile = “的index.php index.html ”在

Find : SkipHosts=”"找到: skiphosts = “ ”
Replace with : SkipHosts=”127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.]”取代: skiphosts = “ 127.0.0.1的regex [ ^ 192 \ 0.168 \ 。 ]的regex [ ^ 10 \ 0.0 \ 。 ] ”
This is to not include statistics from your own local machines, they will remain in the actual log files but excluded from awstats counts.這是不包括統計,從您自己的本地機器,他們將繼續留在實際的日誌文件,但排除awstats計數。 To get actual hits and figures it’s sometime necessary, but is not essential at this stage.獲得實際安打和數字,它的一段時間是必要的,但沒有必要在這個階段。

Build/Update Statistics 建立/更新統計

There are two possible way to analyze, update and generate the AWStats statistics, command line and browser based.有兩種可能的方式來分析,更新和產生awstats統計,命令行和基於瀏覽器。

Command Line Option 命令行選項

Go to the command line, and change directory to your AWStats cgi-bin directory, ie C:\Program Files\AWStats\wwwroot\cgi-bin.到命令行,並將目錄變更為您的awstats cgi - bin目錄,即為C : \程序文件\ awstats \在Wwwroot \的CGI斌。

The AWStats update command line is (replace with your domain):該awstats更新的命令行是(取代與您的域名) :

perl awstats.pl -config=www.yourdomain.com -update的Perl awstats.pl -配置= www.yourdomain.com更新

AWStats database files are saved in directory defined by DirData parameter in config file, which we left as default (current directory). awstats數據庫文件保存在目錄中所界定的dirdata參數在config文件中,這是我們留下的默認(當前目錄) 。 Update might take a while, if the log file is big.更新可能需要一段時間,如果日誌文件是大。 When update is finished, you should get on screen a result like this:當更新完成後,你應該在屏幕上,結果是這樣的:

Update for config “/etc/awstats/awstats.myvirtualhostname.conf”更新配置“的/ etc / awstats / awstats.myvirtualhostname.conf ”
With data in log file “/pathtoyourlog/yourlog.log”…與數據的日誌文件“ / pathtoyourlog / yourlog.log ” … …
Phase 1 : First bypass old records, searching new record…第1期:第一繞道舊有紀錄,尋找新紀錄…
Searching new records from beginning of log file…尋找新的紀錄,從一開始的日誌文件…
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)…第2期:現在的過程中的新記錄(刷新歷史上的磁盤後, 20000的主機) … …
Jumped lines in file: 0跳線在文件: 0
Parsed lines in file: 225730解析線的文件: 225730
Found 122 dropped records,發現122下降的紀錄,
Found 87 corrupted records,發現87損壞的紀錄,
Found 0 old records,發現0舊紀錄,
Found 225521 new qualifed records. 225521發現新的合格的紀錄。

Browser Option 瀏覽器的選擇

AWStats statistics can be updated from a browser, to provide real-time statistics, by clicking the “Update now” link that appears when AWStats is used as a CGI (only applicable if AllowToUpdateStatsFromBrowser is set to 1 in AWStats config file ). awstats的統計資料可以更新從一個瀏覽器,提供實時的時間統計,按一下“立即更新”鏈接時,會出現awstats是用來作為CGI (只適用於allowtoupdatestatsfrombrowser是設置為1 awstats config檔) 。

Read Statistics 閱讀統計

Again, there is 2 methods where AWStats’s statistics can be read, corresponding to the generation method of the stats mentioned above.再次,有2種方法的地方awstats的統計數據可以看到,相應的發電方法,統計上述。

Command Line Option 命令行選項

At the same directory, after the first update command is finished, run the following command:位於同一目錄後,第一個更新命令完成後,運行以下命令:

perl awstats.pl -config=myvirtualhostname -output -staticlinks > awstats.myvirtualhostname.html的Perl awstats.pl -配置= myvirtualhostname輸出staticlinks > awstats.myvirtualhostname.html

The process may take a while, after it’s finished, a html will be generated where you can view it with a browser by double clicking on it.過程可能需要一段時間後,它的結束,一個HTML會產生這裡您可以查看它與瀏覽器雙擊它。

Browser Option 瀏覽器的選擇

Access the following directory (replace with your own domain):訪問以下目錄(替換為自己的域名) :

http://www.myserver.mydomain/awstats/awstats.pl?config=myvirtualhostname

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明 :這是一個機器翻譯網頁是“按原樣”提供的擔保。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原版的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at分享和貢獻,或取得技術的支持和幫助,在 My Digital Life Forums 我的數字生活論壇 .



Leave a Reply離開的答复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些標籤:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <刪除日期時間= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting訂閱無評論


Custom Search

New Articles新的條款,

Incoming Search Terms for the Article傳入的搜索條件文章

AWStats FOR WINDOWS awstats適用於Windows - - AWStats windows awstats的Windows - - maillog analyzer maillog分析儀 - - install awstat 安裝awstat - - awstat install awstat安裝 - - awstat windows awstat的Windows - - awstats windows installer awstats的Windows Installer - - awstats windows apache awstats的Windows阿帕奇 - - awstats command line awstats命令行 - - Flush history file on disk (unique hosts reach flush limit of 20000) 刷新歷史磁盤上的文件(獨特的主機達到沖洗限額20000 ) - - how to install awstats 如何安裝awstats - - awstats on windows awstats在Windows - - installer awstat 安裝awstat - - apache awstats windows 阿帕奇awstats的Windows - - awstats_configure.pl awstats_configure.pl - - awstat command line awstat命令行 - - how to install awstats in windows 2003 server 如何安裝awstats在Windows 2003 Server中 - - Flush history file on disk (unique url reach flush limit of 5000) 刷新歷史磁盤上的文件(獨有的URL達到沖洗限額5000 ) - - AWstat on windows awstat在Windows - - awstats windows 2003 awstats的Windows 2003 - - awstats apache awstats阿帕奇 - - awstat installation awstat安裝 - - If not, you can run "awstats_configure.pl" from command line, or create it manually. 如果不是,您可以運行“ awstats_configure.pl ”從命令行,或手動創建。 - - awstats windows installation awstats安裝Windows - - awstats apache windows awstats的Apache的Windows - - maillog analyser maillog分析儀 - - awstat installer for windows awstat Installer for Windows的 - - how to install awstats in windows 如何安裝awstats在Windows - - AWstats for Windows apache awstats用於Windows的Apache - - awstats on windows apache awstats在Windows的Apache - - awstats directory location awstats目錄位置 - - installing awstats +bsd 安裝awstats + BSD的 - - AWStats Logfile Analyzer awstats日誌文件分析儀 - - repair corrupted records in awstats apache 修復損壞的紀錄,在awstats阿帕奇 - - awstat installer awstat安裝 - - awstats installer awstats安裝 - - how to install awstats on windows 如何安裝awstats在Windows - - awstats maillog awstats maillog - - awstats for win 64 awstats為贏64 - - how to setup AWstats on windows XP 如何安裝awstats在Windows XP - - instalar awstats en windows server 安裝awstats英文的Windows Server - - how to install awstat 如何安裝awstat - - Awstats with apache on windows awstats與Apache在Windows - - awstat maillog awstat maillog - - awstats install without httpd.conf awstats安裝未經httpd.conf中 - - analyze access.log OS X 分析access.log OS X的 - - awstats windows 2003 ntfs awstats的Windows 2003的NTFS - - awstats for windows xp awstats用於Windows XP - - awstats server 2003 awstats Server 2003的 - - install awstats 安裝awstats - -