How to use the AWSTATS+GEOIP implementation under CentOS 6.3 to view Web site access attribution

Source: Internet
Author: User
Tags geoip html page centos install perl iptables maxmind

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.