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分析仪 - - awstat install awstat安装 - - install awstat 安装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 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 - - awstats for windows 2003 awstats适用于Windows 2003 - -