- Install geoip packages:
sudo apt-get install geoip-bin php5-geoip
- Download GeoIP Lite version:
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O /tmp/GeoLiteCity.dat.gz
- Unzip GeoIP Lite to /usr/share/GeoIP/GeoIPCity.dat (this is what I forgot: to rename the file):
sudo gunzip -c /tmp/GeoLiteCity.dat.gz > /usr/share/GeoIP/GeoIPCity.dat
- Reload apache
sudo /etc/init.d/apache2 reload
A mix of how-tos, notes, and gotchas that I might need again sometime in the future.
Showing posts with label geoip. Show all posts
Showing posts with label geoip. Show all posts
Tuesday, November 29, 2011
Setup GeoIP for PHP5 on Ubuntu Server
I lost a few hours on this, although I done it sometime ago. To make sure I don't forget it again, here it is:
Subscribe to:
Posts (Atom)