Country settings in AWStats

 

By implementing this setting in AWStats you can track the Geo location of visitor of your website.

Follow the procedure to implement the settings
# mkdir /usr/local/share/GeoIP
# cd /tmp wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# gunzip GeoIP.dat.gz mv GeoIP.dat /usr/share/GeoIP
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

or or or

# yum install mod_geoip
# yum install geoipdate
# yum install geoip-devel

Now Edit the file configuration file for your website in /etc/awstats  and  search below lines

#LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /pathto/GeoIPCity.dat"
#LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"

and change to

GeoIPCity.dat LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/"

It may give you error like below



















To Fix this error run below commands
# yum install perl-CPAN
# cpan YAML
# cpan Geo::IP::PurePerl Geo::IP
# ldconfig -v