1.GeoIP插件安装:
#安装Perl组件
perl -MCPAN -e 'install Geo::IP::PurePerl'
或
yum install perl-Geo-IP
#下载GeoIP国家、城市数据库、AS数据库
cd /usr/local/awstats/wwwroot/cgi-bin/plugins
wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gzip -d GeoLiteCity.dat.gz
gzip -d GeoIP.dat.gz
gzip -d GeoIPASNum.dat.gz
编辑Awstats配置文件加载插件:
LoadPlugin="geoip GEOIP_STANDARD /usr/local/awstats/wwwroot/cgi-bin/plugins/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/awstats/wwwroot/cgi-bin/plugins/GeoLiteCity.dat"
LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /usr/local/awstats/wwwroot/cgi-bin/plugins/GeoIPASNum.dat"
2.纯真IP库插件安装:
cd /usr/local/awstats/wwwroot/cgi-bin/plugins
wget https://www.haiyun.me/download/qqwry.pl
wget https://www.haiyun.me/download/qqhostinfo.pm
#下载纯真IP数据库
wget http://update.cz88.net/soft/qqwry.rar
unrar qqwry.rar
修改qqwry.pl内IP数据目录:
my $ipfile="${DIR}/plugins/QQWry.Dat";
修改awstats配置加载扩展:
LoadPlugin="qqhostinfo"