免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1109 | 回复: 0
打印 上一主题 下一主题

Awstats 日志访问统计 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-13 10:49 |只看该作者 |倒序浏览

                  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 下载地址:
http://www.awstats.cn/awstats/awstats-6.5.tar.gz
   
二 软件安装
   1)mv 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:
www.mysite.com
Example: demo
Your web site, virtual server or profile name:
>
www.itfm.com
-----> 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.www.itfm.com.cn.conf'
Config file /etc/awstats/awstats.www.itfm.com.cn.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=www.itfm.com.cn
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.www.itfm.com.cn.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'www.itfm.com.cn' with command:
> perl awstats.pl -update -config=www.itfm.com.cn
You can also read your statistics for 'www.itfm.com.cn' with URL:
>
http://localhost/awstats/awstats.pl?config=www.itfm.com.cn
Press ENTER to finish...

10)vi /usr/local/apache/conf/extra/httpd-vhosts.conf
     修改日志格式为combined  CustomLog logs/itfm-access_log combined
11)vi /etc/awstats/awstats.www.itfm.com.conf
    LogFile="/usr/local/apache/logs/itfm-access_log "
    LogType=W
    LogFormat=1
    SiteDomain="
www.itfm.com
"
    HostAliases="itfm.com
www.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=www.itfm.com -update
ESC :wq
15)./usr/local/apache/bin/apachectl restart



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/21335/showart_358815.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP