apache服务器日志监控统计工具awstat

 AWStats 是一个免费的强大而有个性的工具,带来先进的网络,流量,FTP或邮件服务器统计图. 本日志分析器作为CGI或从命令行在数个图形网页中显示你日志中包含的所有可能信息. 它利用一部分档案资料就能经常很快地处理大量日志档案, 它能分析日志文件来自从各大服务器工具 , Apache日志档案 s (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C的日志格式)及许多其他网站,Proxy(代理服务器)Wap、流量服务器、邮件服务器和一些 FTP服务器 .

awstat的功能:

 AWStats是在Sourceforge上发展很快的一个基于PerlWEB日志分析工具。它可以统计您站点的如下信息:

一:访问量,访问次数,页面浏览量,点击数,数据流量等

二:精确到每月、每日、每小时的数据

三:访问者国家

四:访问者IP

五:Robots/Spiders的统计

六:纺客持续时间

七:对不同Files type 的统计信息

八:Pages-URL的统计

九:访客操作系统浏览器等信息

十:其它信息(搜索关键字等等)

安装:

(1)      下载awstats- 7.1.1 .tar.gz最新版本的,安装之前首先启动apache

(2)      解压包:[root@redhat ~]# tar -zxvf awstats- 7.1.1 .tar.gz -C /usr/local/src

(3)      确定系统已经安装perl
[root@redhat awstats- 7.1.1 ]# whereis perl

perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz

(4)      编译awstats

[root@redhat ~]# cd /usr/local/src/awstats- 7.1.1 /

 

[root@redhat awstats- 7.1.1 ]# cd tools

[root@redhat tools]# perl awstats_configure.pl

----- AWStats awstats_configure 1.0 (build 1.9) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS detected: Linux, BSD or Unix
----> Check for web server install
#
如果系统中没有安装apache的话会提示要求你输入apache配置文件的路径
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
>                                                               
#
如果系统已安装apache的话,自动会检测到配置文件
-----> Check for web server install
  Found Web server Apache config file '/usr/local/apache/conf/httpd.conf'
-----> Check and complete web server config file '/usr/local/apache/conf/httpd.conf'
Warning: You Apache config file contains directives to write 'common' log files
This means that some features can't work (os, browsers and keywords detection).
#
输入y,将日志记录方式由'command'改为更详细的‘combined’
Do you want me to setup Apache to write 'combined' log files [y/N] ?  y
  Add 'Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"'
  Add 'Alias /awstatscss "/usr/local/awstats/wwwroot/css/"'
  Add 'Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"'
  Add 'ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"'
  Add '<Directory>' directive
  AWStats directives added to Apache config file.
-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf'
  File awstats.model.conf updated.
-----> Need to create a new config file ?
#
输入y创建一个新的配置文件
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
#
输入配置文件的名字
> AnalyzeApacheLog
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
#
指定配置文件目录,一般都是默认的,直接回车就行

-----> Create config file '/etc/awstats/awstats.AnalyzeApacheLog.conf'
 Config file /etc/awstats/awstats.AnalyzeApacheLog.conf created.
-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=AnalyzeApacheLog
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue... 
A SIMPLE config file has been created: /etc/awstats/awstats.AnalyzeApacheLog.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'AnalyzeApacheLog' with command:
> perl awstats.pl -update -config=AnalyzeApacheLog
You can also read your statistics for 'AnalyzeApacheLog' with URL:
#
查看分析报告的链接如下:
> http://localhost/awstats/awstats.pl?config=AnalyzeApacheLog


Press ENTER to finish...

自己就不明白啊,搞不懂

 

你可能感兴趣的:(Apache服务器,日志监控,统计工具,Awstat)