|
|
Awstats是一个非常简洁而且强大的统计工具。它可以统计您站点的如下信息:
一:访问量,访问次数,页面浏览量,点击数,数据流量等精确到每月、每日、每小时的数据
二:访问者国家、访问者IP、操作系统、浏览器等
三:Robots/Spiders的统计
四:纺客持续时间
五:对不同Files type 的统计信息
六:Pages-URL的统计
七:其它信息(搜索关键字等等)
http://awstats.sourceforge.net/ awstats官方网站
http://www.perl.com/ perl官方网站
[root@localhost awstats]# ls
awstats-7.0.tar.gz perl-5.16.1.tar.gz
安装perl
Awstats基于Perl的WEB日志分析工具,网上关于它的介绍还是比较多的,因为是基于perl开发的,在管在windows还是linux下都需要先安装perl环境。所以,我们先安装perl 。其实,还需要一个apache环境,在上一节中已经进行了安装讲解。
[root@localhost awstats]# tar xvfz perl-5.16.1.tar.gz 解压
[root@localhost awstats]# cd perl-5.16.1 进入目录
[root@localhost perl-5.16.1# rm -f config.sh Policy.sh
[root@localhost perl-5.16.1]# sh Configure -de
[root@localhost perl-5.16.1]#make 编译
[root@localhost perl-5.16.1]# make test
[root@localhost perl-5.16.1]# make install 安装
config.sh Policy.sh 为以前安装时的配置文件,新安装或升级安装时需要将其删除。
sh Configure -de 安装使用默认配置,一般而言将会 ok
make test 执行make命令, 然后make根据test目标规则, 执行规定的操作。
安装完成后 perl 所在目录为 /usr/local/lib/perl5, perl 执行文件在 /usr/local/bin 中。
安装awstats
解压awstats
[root@localhost awstats]# tar xvfz awstats-6.4.tgz
[root@localhost awstats]# mkdir /etc/awstats
[root@localhost awstats]# mkdir /var/lib/awstats
上面创建的两个目录都将在后面的配置中用到,一个用于存放站点日志分析的配置文件,一个用于存放日志数据信息。
[root@localhost awstats]# cp -R ./awstats-7.0 /usr/local/
-R 表示复制目录及目录内的所有项目到/usr/local/目录下
[root@localhost test]# mv awstats-7.0 awstats 进行一个重命名,便于操作而已。
配置awstats
[root@localhost tools]# pwd
/usr/local/awstats//tools
Awstats的配置有自带的配置工具awstats_configure.pl ,首先用vi打开configure.pl文件,看看第一行有关perl运行环境的配置是否正确。
[root@localhost tools]# vi awstats_configure.pl
#!/usr/bin/perl
.............
[root@localhost tools]# pwd
/usr/local/awstats/tools
[root@localhost tools]# perl awstats_configure.pl 运行配置文件
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"> |
|