笔记 by 车东

在DreamHost上使用AWStats国家/地区统计: GeoIP和GeoCity Lite的配置方法

· 日志分析|AWStats

今天看了一下:QiRan.ORG: awstats6.5安装笔记,发现原来Dreamhost是直接支持GeoIP的。相应的perl模块已经安装了:可以看到man page。

设置后的输出效果如下 awstats_geoip_geolite_city.png

具体配置过程附后:

可惜Dreamhost的GeoIP.dat已经是去年6月份的数据了,有些旧: /usr/local/share/GeoIP/GeoIP.dat -rw-r–r– 1 root root 714742 2005-06-07 21:39 /usr/local/share/GeoIP/GeoIP.dat

而且DreamHost缺省也没有安装GeoLite City库,如果想用GeoIP和GeoLiteCity的最新的数据可以直接从MaxMind下载: wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

然后配置geoip和geoip_city的插件使用相应的数据文件即可: LoadPlugin=“geoip GEOIP_STANDARD /home/chedong/chejun.com/cgi-bin/awstats/GeoIP.dat” LoadPlugin=“geoip_city_maxmind GEOIP_STANDARD /home/chedong/chejun.com/cgi-bin/awstats/GeoLiteCity.dat”

比较一下最新County数据库和dreamhost的文件大小 ll GeoIP.dat -rw-rw-r– 1 chejun pg551459 924100 2006-08-02 12:01 GeoIP.dat [chejun@whittier /home/.blondie/chedong/chejun.com/cgi-bin/awstats]$ ll /usr/local/share/GeoIP/GeoIP.dat -rw-r–r– 1 root root 714742 2005-06-07 21:39 /usr/local/share/GeoIP/GeoIP.dat

以前的一篇装文档: http://www.flickr.com/photos/chedong/110325758/

2006-08-18 Dreamhost的回复: We run the Debian Sarge Stable version of libgeoip1, and will not be upgrading it until the package is updated in Stable.

whittier: 07:25 PM# apt-cache show libgeoip1 See also:

http://packages.qa.debian.org/g/geoip.html

💬 历史评论

以下 3 条评论从旧版 Movable Type 博客迁移而来。 原始评论时间:2002–2016 年。

Michael · 2006-08-15 16:36

请问这两行:

LoadPlugin=“geoip GEOIP_STANDARD /home/chedong/chejun.com/cgi-bin/awstats/GeoIP.dat” LoadPlugin=“geoip_city_maxmind GEOIP_STANDARD /home/chedong/chejun.com/cgi-bin/awstats/GeoLiteCity.dat”

是插入到awstats.model.conf中任何位置吗? 谢谢!


istef · 2006-08-16 12:01

即使 Dreamhost 没有预先安装 GeoIP 和 GeoCity Lite 所对应的库和 Perl Module,在 DH 上也可以自己编译安装。只需修改一下 awstats 代码将自定义的 perl module 的位置压入@INC 就可以使用了。


无名 · 2006-08-31 13:43

关于AWStats 有个问题 使用AWStats有三个月了,但是随着,网站访问量增大,现在每天定时生成的数据的时间越来越长了,原来可能需要2-3个小时就能完成,现在有时候需要7-8个小时了.有什么方法可以让他生成数据的时间缩短点吗?

谢谢