Awstats is a foreign open source of the website PV flow monitoring software, can obtain Apache or Nginx log information, the log useful information to integrate into the HTML page display, because the content of the analytic log is very meticulous, so many of the circle take this as a website PV data reference.
Before the introduction of how to carry Awstats on the Apache platform, today studied the afternoon, and finally the GeoIP plug-in integration into the Awstats, IP reverse analysis of the attribution function.
System environment: centos6.3 x64
awstats:awstats-7.1.1
geoip:geoip-1.4.8
geo-ip:geo-ip-1.27
geo-ipfree:geo-ipfree-0.2
I. Deployment environment:
1. Close Iptables and SELinux
# Service Iptables Stop
# Setenforce 0
# Vi/etc/sysconfig/selinux
---------------
Selinux=disabled
---------------
2. Install Dependency Pack
# yum Install Perl-devel libtool-y
Make Libtool effective
# aclocal
3. Installation configuration Awstats transmission door: http://showerlee.blog.51cto.com/2047005/1174141
Two. Installation Configuration GeoIP plugin:
1. There is a need to compile and install 3 GeoIP compilation packages, which are related to each other and must be installed individually:
# wget http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz
# tar zxf geoip-1.4.8.tar.gz
# CD GeoIP-1.4.8
#./configure--prefix=/usr/local/geoip
# Make && make install
Since the author has customized the installation path when compiling GeoIP, we need to load the associated GEOIP module library
# echo '/usr/local/geoip/lib ' >>/etc/ld.so.conf
#/sbin/ldconfig/etc/ld.so.conf
# wget http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.27.tar.gz
# tar zxf geo-ip-1.27.tar.gz
# CD geo-ip-1.27
Associating GeoIP Library files:
# perl makefile.pl libs= '-l/usr/local/geoip/lib ' inc= '-i/usr/local/geoip/include '
# Make && make install
# wget http://search.cpan.org/CPAN/authors/id/G/GM/GMPASSOS/Geo-IPfree-0.2.tar.gz
# TAR-ZXVF Geo-ipfree-0.2.tar.gz
# CD geo-ipfree-0.2
# Perl makefile.pl
# Make && make install
2. Download Maxmind free GeoIP and Geoipcitylite packets:
# cd/etc/awstats/
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# gzip-d GeoLiteCity.dat.gz
# gzip-d GeoIP.dat.gz