How to append Cityes statistic in awstats (GeoLiteCity)
I suppose you have already installed awstats statistic, GeoIP plagin etc..
change default script which update database file about countries (GeoIP.dat):
# vim /usr/local/bin/geoipupdate.sh
#!/bin/sh
cd /tmp
fetch http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
fetch http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
fetch http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoLiteCity.dat.gz
gunzip GeoIPASNum.dat.gz
mv -f GeoIP.dat /usr/local/share/GeoIP/
mv -f GeoLiteCity.dat /usr/local/share/GeoIP/
mv -f GeoIPASNum.dat /usr/local/share/GeoIP/
I mark string wich I’ve added.
Run script and put in /etc/crontab if you want always keep base in actual condition.
after that add in awstats config your site:
# vim /usr/local/etc/awstats/awstats.howtobsd.info.conf
#LoadPlugin="geoip"
LoadPlugin="geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoLiteCity.dat"
LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoIPASNum.dat"
awstats statistic before:
awstats statistic after:
Posted on June 15th, 2010 by admin
Filed under: Software