今天看了一下:QiRan.ORG: awstats6.5安装笔记,发现原来Dreamhost是直接支持GeoIP的。相应的perl模块已经安装了:可以看到man page。
设置后的输出效果如下
具体配置过程附后:
可惜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
[[email protected] /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
作者:车东 发表于:2006-08-15 13:08 最后更新于:2007-12-19 09:12版权声明:可以转载,转载时请务必以超链接形式标明文章 在DreamHost上使用AWStats国家/地区统计: GeoIP和GeoCity Lite的配置方法 的原始出处和作者信息及本版权声明。
http://www.chedong.com/blog/archives/001182.html
« 歪打正着之:免费杀毒软件和芝华士广告 | (回到Blog入口)|(回到首页) | DSO模式安装mod_perl备忘 » [再编辑]