GeoIP

GeoIP work with a /usr/share/GeoIP/GeoIP.dat data file, what you have to update regularly.

/usr/local/bin/geoipLightUpdate.sh

#!/bin/sh

WGET="/usr/bin/wget"
GEOIP_DIR="/var/www/usr/share/GeoIP"
GUNZIP="/bin/gunzip"

$WGET -q -O "$GEOIP_DIR/GeoIP.dat.gz" "http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz"

$GUNZIP -f "$GEOIP_DIR/GeoIP.dat.gz"

exit 0

(If you put the web server into chroot environment, then the above path may be different.)

After this you can make a link to this file from the /etc/cron.monthly directory.



http://www.maxmind.com/

 
Logged in as: Oszkár Kmetti
linux/configure/geoip.txt · Last modified: 2009.01.14 16:10 by oszi
 
Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki