GeoIP for AWStats, installation notes

  1. download GeoIP C API, extract to working dir [/PATH/TO/WORK]
    tar zxvf
  2. download GeoIP Perl Module (Geo::IP)
  3. cd /PATH/TO/WORK
    ./configure –prefix=/PATH/TO/GeoIP_C
    make check
    make install
    make clean (optional)
  4. Pay your attention to the message

    Libraries have been installed in:

    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR’
    flag during linking and do at least one of the following:
    – add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
    during execution
    – add LIBDIR to the `LD_RUN_PATH’ environment variable
    during linking
    – use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
    – have your system administrator add LIBDIR to `/etc/’

    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and manual pages.

  5. Install Geo::IP perl module (faster, but requires C library)
    cd /PATH/TO/GeoIP_PERL
    perl Makefile.PL
    make test
    make install
    make clean (optional)
  6. Extending the perl library path to include your Geo::IP installation
    vim /PATH/TO/AWSTATS/cgi-bin/
    add one line just below “require 5.007;”:
    BEGIN { push @INC, ‘/PATH/TO/INSTALL/GeoIP/lib/perl/5.10.0’ }


About mtlin

I'm easygoing and sometimes sentimental, also can be very funny. Geek style but social. A Blogger, a Wikipedian and an Engineer.
This entry was posted in blog, Software and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.