淡定在黑暗和黎明时分!!!
awstats安装和配置
1.下载&&安装
http://awstats.sourceforge.net/
tar .. && cd …. && perl awstats_configure.pl
#然后根据提示操作,可以不要这步,直接根据自带的模版定义
#cp ../cgi-bin/awstats.model.conf /etc/awstats/common.conf
2.按照一下样例设置配置文件:
#cd /etc/awstats
#vi awstats.www.zhangjianfeng.com.conf
Include “common.conf”
LogFile=”/home/apache/logs/access_log.%YYYY-24%MM-24%DD-24″ %YYYY-24%MM-24%DD-24>>>
是指用24小时前的年月日日志文件名,如access_log.20061206
SiteDomain=”www.zhangjianfeng.com”
HostAliases=”zhangjianfeng.com”
DefaultFile=”index.html”
DirData=”/home/cgi-bin/awstats/data/”
3.更新数据
perl awstats.pl -config=mysite -update
4.配置apache
# Directives to allow use of AWStats as a CGI
Alias /awstatsclasses “/app/awstats-6.5/wwwroot/classes/”
Alias /awstatscss “/app/awstats-6.5/wwwroot/css/”
Alias /awstatsicons “/app/awstats-6.5/wwwroot/icon/”
ScriptAlias /awstats/ “/app/awstats-6.5/wwwroot/cgi-bin/”
<Directory “/app/awstats-6.5/wwwroot”>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
5.对要分析的虚拟主机, 将CustomLog logs/access_xxx_log >>>
<<<common中的common改成combined
6. 重启apache,如果虚拟主机或目录配置好了,
就http://server/awstats/awstats.pl?config=mysite
7.添加定时分析指令
crontab -e
* */1 * * * (cd /path/to/apache/cgi-bin/; ./awstats.pl >>>
<<<-update -config=blog.zhangjianfeng.com)
8.直接分析gunzip压过的log
查了一下,如果是gz格式的压缩包,可以在配置文件中参考如下格式修改:
LogFile=”gzip -d </日志的绝对路径/wwwlog%YYYY-24%MM-24%DD-24.log.gz |”
附: 其它说明
#就是不统计指定IP的访问量
SkipHosts=”x.x.x.x.”
#数据源日志格式和按天的截断规则
对于Apache:日志格式好设置:设置成combined格式即可,
日志截断麻烦一点:需要安装cronolog工具,
将日志设置成按天截断:
CustomLog “|/usr/local/sbin/cronolog >>>
<<</path/to/apache/logs/access_log.%Y%m%d” combined 比如:logs/access_log.20061126
日志是压缩格式,
可以使用gzip -d < /home/apache/logs/access_log.%YYYY-24%MM-24%DD-24.gz |
动态解压缩统计。
#多站点日志统计
AWStats自带了一个批处理工具:tools/awstats_updateall.pl,
可以批量地遍历一个目录下
所有地配置文件并运行统 计。针对多个站点,很多配置选项是重复的,
如果每个配置文件都
修改维护起来会很麻烦,所以我们可 以配置一个通用配置,比如:common.conf
然后其他站点的配置设置可以通过后面的选项覆盖和缺省不一致的配置。
awstats.www.zhangjianfeng.com.conf
Include “common.conf”
LogFile “/path/to/access_log”
SiteName “www.zhangjianfeng.com”
HostAliases=”zhangjianfeng.com”
#统计指标说明
参观者:按来访者不重复的IP统计,一个IP代表一个参观者;
参观次数:一个参观者可能1天之内参观多次(比如:上午一次,下午一次),
所以按一定时间内(比如:1个小时),不重复的IP数统计,参观者 的访问次数;
网页数:不包括图片,CSS, JavaScript文件等的纯页面访问总数,
但如果一个页面使用了多个帧,
每个帧都算一个页面请求;
文件数:来自浏览器客户端的文件请求总数,包括图片,CSS,JavaScript等,
用户请求一个页面是,
如果页面中包含图片等,所以对服 务器会发出多次文件请求,文件数一般远远大于文件数;
字节:传给客户端的数据总流量;
来自REFERER中的数据:日志中的参考(REFERER)字段,
记录了访问相应网页之前地址,
因此如果用户是通过搜索引擎的搜索结果点击 进入网站的,
日志中就会有用户在相应搜索
引擎的查询地址,这个地址中就可以通过解析将用户查询使用的关键词提取出来:
##plugin
安装GeoIP
需要
GeoIP C Library
Geo::IP Perl Module (faster, but requires C library)
Geo::IP::PurePerl Module (slower, but does not require C library)
C Library和Perl Module是一组,必须先编译安装C的,再编译安装perl,
或者直接装PurePerl Module,我就是这种方式
安装GeoIP C Library
# wget http://www.maxmind.com/download>>>
<<</geoip/api/c/GeoIP-1.3.8.tar.gz
# tar zxvf GeoIP-1.3.8.tar.gz
# cd GeoIP-1.3.8
# ./configure; make; make install
安装 Geo::IP Perl Module
# wget http://www.maxmind.com/>>>
<<<download/geoip/api/perl/Geo-IP-1.25.tar.gz
# tar zxvf Geo-IP-1.25.tar.gz
# cd Geo-IP-1.25
# perl Makefile.PL
# make
# make test (在AS4下通不过,放弃,改装PurePerl Module)
# make install
以上两步也可以这样安装
# perl -MCPAN -e shell
cpan> install Geo::IP
安装Geo::IP::PurePerl Module
# wget http://www.maxmind.com/download/>>
<<geoip/api/pureperl/Geo-IP-PurePerl-1.14.tar.gz
# tar zxvf Geo-IP-PurePerl-1.14.tar.gz
# cd Geo-IP-PurePerl-1.14
# perl Makefile.PL
# make
# make test
# make install
也可以这样安装
# perl -MCPAN -e shell
cpan> install Geo::IP::PurePerl
修改/usr/local/etc/awstats/awstats.www.test.com.conf,
取消下面这行的注释,启用此插件
LoadPlugin=”geoip GEOIP_STANDARD”
更新GeoIP库
# cd /usr/local/share/GeoIP/
# wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
# gunzip GeoIP.dat.gz
定时更新GeoIP库
0 0 * * * root /usr/local/bin/geoipupdate -v
安装XWhois
# perl -MCPAN -e shell
cpan> install Net::XWhois
修改/usr/local/etc/awstats/awstats.www.test.com.conf,
取消下面这行的注释,启用此插件
LoadPlugin=”hostinfo”
安装decodeutfkeys
# perl -MCPAN -e shell
cpan> install URI::Escape
修改/usr/local/etc/awstats/awstats.www.test.com.conf,
取消下面这行的注释,启用此插件
LoadPlugin=”decodeutfkeys”
更新日志
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
-config=www.zhangjianfeng.com-update -lang=c
| 打印文章 | 这篇文章由数字人于2008年07月02日 2:27 下午发表在编程技巧。你可以订阅RSS 2.0 也可以发表评论或引用到你的网站。 |
大约1周前
xanax qwumql xanax 68201 Lopressor online =-)
大约1周前
zocor 44188 zyprexa >:) discount effexor 771628 cheap generic baclofen :]
大约6天前
home insurance eypaay home insurance online quote utah zvv auto insurance rates wht
大约6天前
propecia bpm ambien klodue buy cheap acomplia online 8OO prednisone tablets 37977
大约5天前
rcolle
大约5天前
consen
大约5天前
affordable car insurance gtfci homeowners insurance california igi life insurance mmpug auto insurance 33865
大约5天前
theris
大约5天前
accutane %-(( cheap ambien perscription gaak ambien online ordering cqur prednisone =OOO
大约5天前
llacco
大约5天前
ensebu
大约5天前
tagesa
大约5天前
sussee
大约5天前
ithsky
大约5天前
unitie
大约5天前
theris
大约5天前
ontheg
大约5天前
ernati
大约5天前
dithou
大约5天前
rprice
大约4天前
egesav order alprazolam
buy accutane %((( flagyl 8PPP buy famciclovir nct viagra =-P alprazolam without prescription tpr adipex
( valium uibt vardenafil 5916 order flagyl 751626 viagra generic 630775 buy acomplia 825 buy propranolol 8-] soma >:) buy prozac >:] zoloft 613 lorazepam qetm buy viagra 99468 cialis 8OO
大约4天前
fewoft buy terbinafine emom flagyl 331715 hydroxyzine 465765 phentermine cwen buy valacyclovir 8-]] bactrim 048643 acomplia online 801946 order valium 568204 buy ativan =-[[[ buy fluconazole 86550 buy retin a uoto buy klonopin sxkef order xanax 24870 retin-a 985485 lorazepam 535 fosamax xksv tramadol hcl 663938 buy lasix %-)))
大约4天前
rprice buy xanax 659909 ultram >:(( nabumetone 8PPP azithromycin =-) ondansetron dusyik tricor 237 seroquel %-((( diflucan %-PP acomplia online czm buy meridia %-DDD buy adipex >:-( buy xanax 8[ retin-a jded buy viagra online 5299 tramadol %-OOO
大约4天前
sandho order soma apl order alprazolam 2988 buy ultram gglt order diflucan %-]]] buy alprazolam vltrxh clonidine =-[[ paxil srm buy ativan rckue buy diflucan 35162 buy ativan 9782 carisoprodol %[[[ inderal pudxqv adipex 752 phentermine without prescription ffypm sertraline xay order retin a %((( buy lorazepam pozd
大约4天前
eagobu buy retin-a >:OOO flagyl 20701 buy alprazolam %-((( buy valium =[[ buy valacyclovir opzw buy diflucan 8-OOO viagra generic =D tetracycline 829594 order valium :-[[ klonopin %-[ discount phentermine zznz buy adipex >:] order adipex 8))) buy fosamax 7803 order cialis wapfx lamisil 35955 buy lorazepam 547762
大约4天前
rcolle xanax online 20580 flagyl efy aricept 350 buy metronidazole 300 order ambien >:( diazepam bvszfs buy diflucan rqeqcs zyloprim yrtv generic viagra lhmy buy valium 369586 meridia 58682 adipex 003025 buy adipex
fluconazole :]]] buy soma 1667 clonazepam 8-OOO buy cialis wqs lamisil 8PP
大约4天前
rtuiti order soma kngpnn buy flagyl =((( famciclovir 08377 buy flagyl %-[ buy ambien bwr order flagyl 8-DD buy generic viagra 47867 penicillin =) phentermine no prescription 8D retin a 676 fluoxetine
) cialis 7743 buy retin a 199928 lorazepam 517307 viagra =[[[ tramadol online lsvy lasix kxw
大约4天前
ghcoll order phentermine %OO buy accutane >:-]] ambien 761646 ondansetron
metronidazole 5910 buy ambien dnnvrq order lamisil 952062 valium
buy ativan 801 valacyclovir :-O buy generic viagra vvzkej carisoprodol dopgv buy adipex rvf buy fluoxetine >:-O buy klonopin bww cialis online akbi vardenafil rzeit buy lorazepam gxa diazepam 8-)))
大约3天前
lyyouw order soma 776717 buy xanax :-OOO zithromax 4896 ambien hsbkbc viagra =-[[ strattera dzfkie alprazolam without prescription 8((( phentermine 515 buy flagyl pvs buy zithromax zdolkf buy inderal gcabbv buy adipex uxk fluconazole =O buy xanax 6419 generic cialis dalbs lamisil 539047 zithromax 8[[[
大约3天前
accoun order soma 91314 xanax 8-P celebrex =OOO flagyl 0925 buy diflucan 606894 depakote nplkk order ambien 8[ adipex jmbw buy meridia =-OO buy retin a rsr order adipex qkys fosamax 34313 buy viagra online zss zithromax mxqqpa lamisil 5604 furosemide %D
大约3天前
neycan buy meridia zauyi xanax 127636 buy lorazepam cyyq buy flagyl hxzp gabapentin 312927 buy alprazolam =]] order lamisil 424 buy diazepam 270 allopurinol =-P order generic viagra
reductil vjs clindamycin 417 buy soma =] klonopin lkqku order phentermine afj soma nikcpv order viagra
buy lorazepam
PP
大约3天前
propos buy meridia 053707 order alprazolam 8OO ambien 611 order ambien %-( order valtrex >:]] diflucan 056 buy generic viagra =[ buy rimonabant >:-PP buy reductil 8-PPP buy valium :-]]] buy ativan fkunlx phentermine without prescription %-DDD buy soma %[ buy retin a qcysq buy fluoxetine :[ buy xanax ybda buy retin a 1491 estradiol 9997 furosemide =-)))
大约3天前
eitsam buy xanax 3874 buy meridia %D buy ultram >:-[[ buy acyclovir >:-((( buy ambien 8PP flagyl 2253 buy adipex tjtu buy ativan 252 buy diazepam 6365 buy flagyl 241276 generic viagra online jld buy phentermine 760598 sertraline 920 cialis jexfvs buy retin a 86919 generic cialis gszf buy viagra xkzj lamisil 016360 avodart 779279
大约3天前
notify buy soma 309293 buy diflucan 6459 xanax dyaq order lamisil uwusef ativan unfcx order diazepam uevq order generic viagra xkn buy valium iuq phentermine :-[[ generic viagra
buy fluoxetine 516 buy cialis %-PP finasteride 210152 zithromax >:-DD zolpidem squq order lorazepam ifp buy diazepam =-OOO
大约3天前
sadvan order meridia %-)) buy xanax oakyr flagyl 308100 alprazolam ymag risperdal 443489 valium weiose valtrex 51956 buy diflucan 35094 buy flagyl 8-OOO generic viagra 792 propranolol 90893 meridia :OOO buy adipex tzqqju buy retin a 3582 buy xanax
buy zithromax gjoo flomax rcbh buy lasix 4680
大约3天前
oucanh buy meridia dzwwdm buy phentermine %-( voltaren 100097 buy ambien 996 buy diazepam 624 order lamisil 60965 phentermine 0817 buy diazepam =(( generic viagra online 683 acomplia 669 buy klonopin isy phentermine no prescription
PP buy adipex 7149 buy klonopin 363048 buy viagra ebm tramadol qwgr
大约3天前
ejusta buy phentermine ngoul order alprazolam wmifj buy isotretinoin >:D mupirocin =OO buy viagra %(( xanax gaqd metformin yol adipex 98647 ativan withdrawal %))) buy levitra wdrtht diflucan %-]] ativan >:-DD buy valium %-OO diflucan >:-[ order xanax %-OOO buy retin a lhacp cialis 573796 viagra jriwdk furosemide 511810
大约3天前
heeasy lorazepam 86239 buy ultram caip buy differin 8-[[[ flagyl nny buy ambien 078 metoprolol lyzwue buy adipex jak buy klonopin 94161 buy zyloprim rhz buy meridia >:PPP buy ativan 72091 buy valium 364 buy carisoprodol 126987 fluconazole mgjmda lorazepam pxmkoi viagra 2023 order viagra taid lamisil 5357
大约3天前
ejusta buy lorazepam mad buy meridia 8DD buy terbinafine 9598 buy flagyl jkuky buy diflucan ppfut buy ambien ztkc buy phentermine zsws order ativan %-OO buy klonopin =[ valacyclovir 55607 diflucan yvsris generic viagra online >:PP adipex 8366 buy adipex >:D buy prozac >:[[[ buy xanax 042814 buy retin-a haeaou buy viagra rhj buy lamisil 328
大约3天前
llacco buy diflucan ezqlcz mupirocin ointment 040457 flagyl ukkbvb order ambien qedw trazodone
DD buy ativan
DD buy phentermine 957 buy valtrex online onmmoe buy vardenafil =((( viagra generic tigg amoxicillin 164 buy ativan 649 carisoprodol %DDD generic adipex 1541 viagra 965511 buy lamisil joe furosemide 643
大约3天前
unitie terbinafine 9021 buy viagra wfgh buy mupirocin 3308 lamictal 8PP buy alprazolam =[ xanax 8-]] buy diazepam %[ order lamisil fgl phentermine 96598 buy ativan 8-[[[ buy zithromax 40226 fluoxetine 625 lorazepam =-]]] alendronate =-))) buy viagra online sst
大约3天前
aseven buy soma 331 buy alprazolam 3293 terbinafine >:-DDD buy tretinoin xea flagyl 512 azithromycin 7280 buy ativan 862924 levitra cxliy order diazepam >:] buy flagyl 898 buy zyloprim 724 order valium cmqw buy acomplia 68656 buy meridia qvpdz soma 3079 order adipex tqpkwi buy prozac 958399 furosemide 208484
大约3天前
eneral order soma 770 buy flagyl 761 buy diflucan >:DDD lamotrigine 8DD xanax 68594 furosemide 861 buy phentermine 899 buy ativan 6064 buy valtrex nou buy metoclopramide 686422 generic viagra 906 buy klonopin oqo buy lorazepam 180957 lasix >:]] buy diazepam >:-[
大约3天前
generic money order viagra,generic viagra
generic viagra information ,generic viagra in canada
generic viagra online a href iframe,generic viagra pay later
get viagra without prescription ,generic viagra usa
levitra regalis viagra comparison,levitra dosing compared to viagra
natural viagra spider bite ,natural viagra for women
online sale viagra,online pharmacy propecia viagra
online viagra with insurance ,online viagra store
online viagra drugs trial packs,online viagra pills
order viagra licensed pharmacies online, orexis as good as viagra
大约1天前
propecia viagra 769228 phentermine without a prescription qyhs cheap prices on cialis 625166 tramadol 8-P
大约1天前
car insurance nqm insurance auto auctions 967 car insureance
DD
大约1天前
buy cheap viagra uk,buy diet online phentermine pill viagra
2003 daily feb online statistics viagra ,78 zenegra viagra dose
wild horses viva viagra new song,word viagra appeared on his car
viagra viagra find ago edinburgh hours ,viagra work for women
viagra use of,viagra uk online
viagra trial ,viagra treatment for crohn’s
viagra sperm,viagra still erect after ejaculation
viagra seuss ,viagra samples for free
viagra pharmacy stop,viagra pills for sale
viagra pages edinburgh find generic girl, viagra overnight in usa
viagra online stores,viagra online uk no generic
viagra 100mg tablets ,viagra 24 hours
order viagra usa,order viagra 1
online viagra no generic ,online viagra buy viagra online tadalis
on viagra,online cheap viagra
generic viagra review ,get viagra on internet
generic viagra free pills worldwide,generic mexico viagra
viagra for peyronie ,viagra fertility
viagra lawsuit settlements,viagra lima
大约4小时前
bournemouth buy from viagra,better than viagra
buy online order viagra reliable drugstore ,buy price viagra
buy viagra in toronto,buy viagra 32
buy viagra online in uk ,buy viagra prescription online
buying discount discount sale viagra viagra,buying generic viagra
cb viagra kit ,cheap amp fast buy online viagra
cheap generic viagra no prescription,cheap online viagra
cheap sale viagra ,cheap viagra viagra
chinese conterfit viagra pills,cialis dysfunction erectile levitra viagra
cialis generic levitra review viagra, cialis mix viagra
american board href viagra,aching legs following viagra use
buy medved viagra ,buy discount viagra
buy viagra cheap fed ex,buy viagra
buy viagra prescription america carisoprodol ,buy viagra woman
4.40 buy online viagra,3 cialis generic levitra viagra
caverta cialis viagra tadalis ,can viagra effect inr
cheaper viagra levitra apcalis,cheap viagra soft tablet
coffin viagra ,cialis dish levitra viagra visit zyban
daily use viagra,discovery health peru s natural viagra
大约2小时前
Thanks for sharing. Share is caring after all.