Step One: Install GeoIP Apache Module mod_geoip
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.
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>
Install the GeoIP Apache API
http://www.maxmind.com/app/mod_geoip [Download Source Files]
GeoIP C API - not necessary?
Install the GeoIP PHP API
http://www.maxmind.com/app/php [Download Source Files] - not sure this is entirely necessary.
GeoLite Country DB
http://www.maxmind.com/app/geolitecountry


