This setup was performed on Ubuntu 8.10, PHP 5.26, Apache2, MySQL 5.
Install mod_geoip:
/# apt-get install libapache2-mod-geoip
Or download mod_geoip source files [1].
Open /etc/apache2/mods-available/geoip.conf and uncomment the GeoIPDBFile
/# vim /etc/apache2/mods-available/geoip.conf
geoip.conf now looks like this:
<IfModule mod_geoip.c> GeoIPEnable On GeoIPDBFile /usr/share/GeoIP/GeoIP.dat </IfModule>
http://www.maxmind.com/app/mod_geoip [1] [Download Source Files] [2]
http://www.maxmind.com/app/c [3]
http://www.maxmind.com/app/php [4] [Download Source Files] [5] - not sure this is entirely necessary.
http://www.maxmind.com/app/geolitecountry [6]
Links:
[1] http://www.maxmind.com/app/mod_geoip
[2] http://geolite.maxmind.com/download/geoip/api/mod_geoip2/
[3] http://www.maxmind.com/app/c
[4] http://www.maxmind.com/app/php
[5] http://geolite.maxmind.com/download/geoip/api/php/
[6] http://www.maxmind.com/app/geolitecountry
[7] http://www.maxmind.com/app/geolitecity