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





I. Deployment environment:

1. Close Iptables and SELinux

# Service Iptables Stop

# Setenforce 0

# Vi/etc/sysconfig/selinux




2. Install Dependency Pack

# yum Install Perl-devel libtool-y

Make Libtool effective

# aclocal

3. Installation configuration Awstats transmission door:

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

# tar zxf geoip-1.4.8.tar.gz

# CD GeoIP-1.4.8


# 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/


# wget

# tar zxf geo-ip-1.27.tar.gz

# CD geo-ip-1.27

Associating GeoIP Library files:

# perl libs= '-l/usr/local/geoip/lib ' inc= '-i/usr/local/geoip/include '

# Make && make install

# wget

# TAR-ZXVF Geo-ipfree-0.2.tar.gz

# CD geo-ipfree-0.2

# Perl

# Make && make install

2. Download Maxmind free GeoIP and Geoipcitylite packets:

# cd/etc/awstats/

# wget

# wget

# 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: 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.