http日志分析工具awstat安装详解
2011-09-10 22:05
381 查看
http日志分析工具awstat安装详解
awstat的功能:
AWStats是在Sourceforge上发展很快的一个基于Perl的WEB日志分析工具。它可以统计您站点的如下信息:
一:访问量,访问次数,页面浏览量,点击数,数据流量等
二:精确到每月、每日、每小时的数据
三:访问者国家
四:访问者IP
五:Robots/Spiders的统计
六:纺客持续时间
七:对不同Files type 的统计信息
八:Pages-URL的统计
九:访客操作系统浏览器等信息
十:其它信息(搜索关键字等等)
安装:
awstats-7.0.zip下载地址:
http://sourceforge.net/projects/awstats/files/AWStats/7.0/awstats-7.0.zip/download
安装之前首先启动apache,并查看进程
/usr/local/apache/bin/apachectl start
解压包:
unzip awstats-7.0.zip
创建存放目录
mkdir -p /usr/local/awstats
mv awstats-7.0/* /usr/local/awstats
确定系统已经安装perl
whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz
编译awstats:
cd /usr/local/awstats/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...
修改配置文件:
vi /etc/awstats/awstats.AnalyzeApacheLog.conf
#LogFile="/var/log/httpd/mylog.log"
LogFile="/home/wwwlog/www.pcstars.com_access.log"
注:
(1)如果同时分析多个日志
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/30.0206.vblog.log /var/apachelogs/31.0206.vblog.log|"
或
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/*.0206.vblog.log|"
(2)分析使用gzip压缩过的日志文件
LogFile="gzip -d </var/log/apache/access.log.gz|"
最后重启apache,通过web访问 http://IP/awstats/awstats.pl?config=AnalyzeApacheLo
前提条件是apache对应的端口没有防火墙限制或者SELinux的限制,否则可能会报403错误
如果出现这种情况最好找系统管理员解决,不要擅自修改系统文件
最后千万不要忘了,将下列行加入执行计划:
/usr/local/awstats/tools/awstats_updateall.pl now
或者
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=AnalyzeApacheLog
awstat的功能:
AWStats是在Sourceforge上发展很快的一个基于Perl的WEB日志分析工具。它可以统计您站点的如下信息:
一:访问量,访问次数,页面浏览量,点击数,数据流量等
二:精确到每月、每日、每小时的数据
三:访问者国家
四:访问者IP
五:Robots/Spiders的统计
六:纺客持续时间
七:对不同Files type 的统计信息
八:Pages-URL的统计
九:访客操作系统浏览器等信息
十:其它信息(搜索关键字等等)
安装:
awstats-7.0.zip下载地址:
http://sourceforge.net/projects/awstats/files/AWStats/7.0/awstats-7.0.zip/download
安装之前首先启动apache,并查看进程
/usr/local/apache/bin/apachectl start
解压包:
unzip awstats-7.0.zip
创建存放目录
mkdir -p /usr/local/awstats
mv awstats-7.0/* /usr/local/awstats
确定系统已经安装perl
whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz
编译awstats:
cd /usr/local/awstats/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...
修改配置文件:
vi /etc/awstats/awstats.AnalyzeApacheLog.conf
#LogFile="/var/log/httpd/mylog.log"
LogFile="/home/wwwlog/www.pcstars.com_access.log"
注:
(1)如果同时分析多个日志
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/30.0206.vblog.log /var/apachelogs/31.0206.vblog.log|"
或
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/*.0206.vblog.log|"
(2)分析使用gzip压缩过的日志文件
LogFile="gzip -d </var/log/apache/access.log.gz|"
最后重启apache,通过web访问 http://IP/awstats/awstats.pl?config=AnalyzeApacheLo
前提条件是apache对应的端口没有防火墙限制或者SELinux的限制,否则可能会报403错误
如果出现这种情况最好找系统管理员解决,不要擅自修改系统文件
最后千万不要忘了,将下列行加入执行计划:
/usr/local/awstats/tools/awstats_updateall.pl now
或者
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=AnalyzeApacheLog
相关文章推荐
- http日志分析工具awstat安装详解(续篇)--AWStats did not find any valid log lines that match your LogFormat paramet
- http日志分析工具Awstat安装详解
- AWStats 基于Perl的WEB日志分析工具 在 windows server 2003 安装配置详解
- linux下日志监控分析工具awstat的安装与使用
- AWStats简介:Apache/Windows IIS的日志分析工具的下载,安装,配置样例和使用(含6.9中文定义补丁)
- web 日志分析工具 awstats 简单安装
- 日志分析工具AWStats在linux环境下的安装配置
- Apache源码编译安装2.2.17版本以及部署AWStats日志分析系统配置详解
- AWStats安装备忘_win_apache_日志分析统计工具
- Logstash+ElasticSearch+Kibana4日志分析系统安装详解
- 可视化日志分析工具Gltail的安装与使用
- Linux 日志分析工具之awstats详解
- AWStats简介:Apache/Windows IIS的日志分析工具的下载,安装,配置样例和使用(含6.9中文定义补丁)
- 日志分析工具AWStats在linux环境下的安装配置安装qqhostsinfo=
- RHEL6.4 apache搭建WEB网站,安装日志分析工具awstats
- 给Clouderamanager集群里安装基于Hive的大数据实时分析查询引擎工具Impala步骤(图文详解)
- Apache服务器的性能测试工具ab 、http_load 日志分析工具webalizer
- AWStats简介:Apache/Windows IIS的日志分析工具的下载,安装,配置样例和使用(含6.9中文定义补丁)
- AWStats简介:Apache/Windows IIS的日志分析工具的下载,安装,配置样例和使用(含6.9中文定义补丁)
- POSTFIX上的邮件日志分析工具(pflogsumm)安装与配置