Chinaunix首页 | 论坛 | 博客
  • 博客访问: 174947
  • 博文数量: 29
  • 博客积分: 2110
  • 博客等级: 大尉
  • 技术积分: 325
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-01 11:32
文章分类

全部博文(29)

文章存档

2012年(3)

2010年(4)

2009年(5)

2007年(16)

2006年(1)

我的朋友

分类: LINUX

2007-08-13 10:49:22

                  Awstats 日志访问统计

 

一 软件说明:

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

     awstats-6.5 下载地址:

   

二 软件安装

   1mv awstats-6.5.tar.gz /usr/local

   2)tar -zxcf awstats-6.5.tar.gz

   3)mv awstats-6.5 awstats

   4)cd awstats/wwwroot

   5)mkdir data

   6)chmod 755 data

   7)cd ../tools

   8)perl awstats_configure.pl

  
----- AWStats awstats_configure 1.0 (build 1.6) (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
  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'
  AWStats directives already present.

-----> 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:
Example: demo
Your web site, virtual server or profile name:
>

-----> 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):
>  选择默认 Enter

-----> Create config file '/etc/awstats/awstats.'
 Config file /etc/awstats/awstats. 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=
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.
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for '' with command:
> perl awstats.pl -update -config=
You can also read your statistics for '' with URL:
>

Press ENTER to finish...

 

10vi /usr/local/apache/conf/extra/httpd-vhosts.conf

     修改日志格式为combined  CustomLog logs/itfm-access_log combined

11vi /etc/awstats/awstats.

    LogFile="/usr/local/apache/logs/itfm-access_log "

    LogType=W

    LogFormat=1

    SiteDomain=""

    HostAliases="itfm.com  192.168.10.240 localhost

    DNSLookup=2

    DirData="/usr/local/awstats/wwwroot/data"

    AllowToUpdateStatsFromBrowser=0

     CreateDirDataIfNotExists=0

    SaveDatabaseFilesWithPermissionsForEveryone=0

    PurgeLogFile=0

    KeepBackupOfHistoricFiles=1

    DefaultFile="index.html index.htm index.jsp"

    SkipHosts="localhost REGEX[^192\.168\.]"

    SkipFiles="REGEX[^\/images] REGEX[^\/css] REGEX[^\/scripts] REGEX[^\/awstats] REGEX[^*\.gif]"

 

12)mv /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf /usr/local/awstats/wwwroot/cgi-bin/common.conf

13)vi /usr/local/awstats/wwwroot/cgi-bin/common.conf

    LoadPlugin="decodeutfkeys"

14)crontab -e

   0 0 * * * ./usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config= -update

ESC :wq

15)./usr/local/apache/bin/apachectl restart

 

阅读(2937) | 评论(0) | 转发(0) |
0

上一篇:apache troubleshooting

下一篇:mysql 更改字符集

给主人留下些什么吧!~~