Apache/IIS的日志分析工具:AWStats(6)
Hacking AWStats
基于地理信息的插件安装:
GeoIP 和 Geo::IPfree(awstats 5.5+)
GeoIP和Geo::IPfree都免费的是国家/IP的影射表,比通过DNS反相解析域名得到的统计准确,而且速度快。GeoIP的API都是免费 的,缺省库是免 费的,收费的是它的数据更新服务。Geo::IPfree不仅代码是公开的,而且库数据也是公开的。
GeoIP安装:
先下载C库:GeoIP C解包后
%./configure; make
#make install
然后下载Perl库:GeoIP Perl解包后
%perl MakeFile.PL; make
#make install
Geo::IPfree安装:
下载Geo::IPfree解 包后
%perl Makefile
%make
#make install
配置:通过在配置文件中启用GEOIP相关插件:
LoadPlugin="geoip GEOIP_STANDARD /home/apache/chedong.com/cgi-bin/awstats/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /home/apache/chedong.com/cgi-bin/awstats/GeoLiteCity.dat"
MaxMind目前免费提供了GeoIP和GeoIPCityLite数据包:可以定期每个月从以下地址下载
http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz