Awstats:
Awstats是在Sourceforge上发展很快的一个基于Perl的WEB日志分析工具。相对于另外一个非常优秀的开放源代码的日志分析工具Webalizer,AWStats的优势在于:
界面友好、由于基于perl很好的解决了跨平台问题、效率比较高、配置/定制方便等
下面对它进行安装:
首先要安装perl,可以通过本地yum安装
下载最新版本的awstats源代码进行安装(我这里是awstats-7.1.1)
解压缩 tar –zxvf awstats-7.1.1.tar.gz
创建的两个目录都将在后面的配置中用到,一个用于存放站点日志分析的配置文件,一个用于存放日志数据信息
mkdir /etc/awstats
mkdir /var/lib/awstats
把解压缩后的awstats-7.1.1移动到/usr/local/目录下并改名字为awstats
Cp-R./awstats-7.1.1/usr/local/
Mvawstats-7.1.1awstats
接下来配置awstats:
进入/usr/local/awstats/tools目录下
[root@station252 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
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):
> none
Your web server config file(s) could not be found.
You will need to setup your web server manually to declare AWStats
script as a CGI, if you want to build reports dynamically.
See AWStats setup documentation (file docs/index.html)
-----> 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 ?
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:
> www.aaa.com
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
然后连敲两次回车结束配置
awstats_configure.pl工具会自动修改apache配置,接下来去修改apache配置文件参数,添加以下内容:

